Skip to content

workflow: separate version bumping and publishing on release#6879

Merged
patak-cat merged 9 commits intomainfrom
release-cli
Feb 12, 2022
Merged

workflow: separate version bumping and publishing on release#6879
patak-cat merged 9 commits intomainfrom
release-cli

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented Feb 12, 2022

Workflow Changes

  • npm run release script moved to top-level with an interactive prompt to select the package
  • version bumping is done with npm run release instead of GH action dispatching
  • The flow of releasing becomes:
    1. Maintainer runs npm run release locally at project root of the latest main branch
    2. Select the package and version that need to be released
    3. The scripts handle version bumping, changelog, git commit with tag and push it to GH
    4. The commit tag triggers Actions to do the building and publishing on CI https://github.com/vitejs/vite/actions/workflows/publish.yml
    5. Done.

Changes Details

  • npm run release moved to root, and no longer runs building and publishing.
  • --skipBuild option has been removed. We use prepublishOnly hook to trigger the build before publishing.
  • changelog scripts in each package has been inlined in the release script to reduce duplication
  • Use npm publish instead of yarn publish since we already handle the version bumping.

New Features

  • npm run release will show commits between the last release of a package for the maintainer to reference

run: pnpm install

- name: Publish package
run: pnpm run ci-publish -- ${{ github.ref_name }} --dry
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: remove the --dry flag

@patak-cat
Copy link
Copy Markdown
Member

The flow looks awesome Anthony, after seeing the three clicks (because of the environment approval) and waiting at each step for the GitHub UI to respond when using dispatch, it makes a lot more sense to use the CLI as you proposed.

@antfu
Copy link
Copy Markdown
Member Author

antfu commented Feb 12, 2022

Kapture.2022-02-12.at.18.39.48.mp4

Added a little helper to show the git diff since the last release

Co-authored-by: patak <matias.capeletto@gmail.com>
@patak-cat patak-cat merged commit fe8ef39 into main Feb 12, 2022
@patak-cat patak-cat deleted the release-cli branch February 12, 2022 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants