-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: add workflow to publish v1.x releases on tag push #1367
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
Conversation
This workflow allows releasing v1.x versions without having to switch GitHub's default branch from main to v1.x. Previously, creating a GitHub release targeting the v1.x branch required temporarily changing the repo's default branch. Usage: 1. Ensure the version is bumped and tagged on v1.x branch 2. Go to Actions > 'Release v1.x' > Run workflow 3. Enter the version number (e.g., 1.25.2) 4. Select the npm tag (latest, release-1.25, etc.) The workflow will: - Validate the version format - Run tests on v1.x branch - Verify the tag exists - Create a GitHub Release (not marked as latest) - Publish to npm with the selected tag
Simpler approach that mirrors the existing main.yml workflow pattern: - Triggers automatically when a v1.* tag is pushed - Runs same build/test matrix as main workflow - Publishes with release-X.Y npm tag (e.g., release-1.25) Usage: git checkout v1.x npm version patch # bumps version and creates tag git push origin v1.x --tags
|
commit: |
Summary
Adds a workflow that automatically publishes v1.x releases when a
v1.*tag is pushed. This mirrors the structure of the existingmain.ymlworkflow.The Problem
Currently, releasing from the v1.x branch requires switching GitHub's default branch from
maintov1.xto create a release targeting that branch.The Solution
A new workflow that triggers on
v1.*tag pushes:Usage
git checkout v1.x npm version patch # bumps version and creates tag (e.g., v1.25.3) git push origin v1.x --tagsThe workflow will automatically:
npm run checkrelease-X.Ytag (e.g.,release-1.25)npm Tags
v1.x releases use
release-X.Ytags instead oflatest, allowing users to install specific minor versions:To update
latestto point to a v1.x release, run manually: