Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to publish npm packages #3850

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlanGreene
Copy link
Member

@AlanGreene AlanGreene commented Dec 18, 2024

Changes

Add workflow to handle automatically publishing packages to the npm registry when the commit message matches the expected format: Publish <version> of the @tektoncd/dashboard-* packages

For PRs it validates the PR is up-to-date with the base branch and that the PR title and commit message match.

For both PRs and pushes it validates that the version in the commit message matches the version in the package.json files.

Once all validation passes, it will publish the package (dry-run for PR).

This simplifies the process of releasing new package versions as now it only requires running the npm version --workspaces <version> command and committing the result. The rest of the process, i.e. ensuring inter-workspace dependencies are updated to use the correct versions before publishing, is handled by the workflow.

Also generate provenance statements for the packages.

/kind misc

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (new features, significant UI changes, API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Dec 18, 2024
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 18, 2024
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from alangreene after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@AlanGreene AlanGreene removed the request for review from skaegi December 18, 2024 15:43
@AlanGreene AlanGreene requested a review from LyndseyBu January 2, 2025 15:09
@AlanGreene AlanGreene marked this pull request as ready for review January 6, 2025 13:16
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 6, 2025
@AlanGreene AlanGreene marked this pull request as draft January 6, 2025 15:45
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 6, 2025
@AlanGreene
Copy link
Member Author

TODO:

  • update release docs to reflect updated process

Add workflow to handle automatically publishing packages to the
npm registry when the commit message matches the expected format:
`Publish <version> of the @tektoncd/dashboard-* packages`

For PRs it validates the PR is up-to-date with the base branch
and that the PR title and commit message match.

For both PRs and pushes it validates that the version in the commit
message matches the version in the package.json files.

Once all validation passes, it will publish the package (dry-run
for PR).

This simplifies the process of releasing new package versions as
now it only requires running the `npm version --workspaces <version>`
command and committing the result. The rest of the process, i.e.
ensuring inter-workspace dependencies are updated to use the correct
versions before publishing, is handled by the workflow.

Also generate provenance statements for the packages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/misc Categorizes issue or PR as a miscellaneuous one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants