-
Notifications
You must be signed in to change notification settings - Fork 427
feat(release): move npm publish to github actions #5464
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
02e3f01 to
de4e600
Compare
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| TAG=$([ "$GITHUB_REF_NAME" = "master" ] && echo latest || echo "$GITHUB_REF_NAME") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we ensure that we only release using winter*/spring*/summer* tags, and we don't accidentally release a tag called rave/github-action-publish?
How do we ensure that only repo maintainers can trigger the workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a conditional for branch validation.
How do we ensure that only repo maintainers can trigger the workflow?
This should help with only lwc-admin members should be able to approve workflow run requests.
.github/workflows/release.yml
Outdated
| node -e " | ||
| const fs=require('fs'); | ||
| const semver=require('semver'); | ||
| const current=JSON.parse(fs.readFileSync('package.json','utf8')).version; | ||
| const next=process.env.INPUT_VERSION; | ||
| if(!semver.valid(next)) { console.error('Invalid semver: '+next); process.exit(1); } | ||
| if(!semver.gt(next,current)) { console.error(`Version ${next} must be greater than current ${current}`); process.exit(1); } | ||
| " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to restrict the release to our specific release branches? eg, summer*, winter*, spring*, master?
Is that something we can do in the GHA UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a condition to release job to only be able to run from specified branches and non-fork repos.
wjhsf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also remove scripts/release/*.sh, because they're no longer necessary.
Co-authored-by: Will Harney <[email protected]>
Details
Remove nucleus config and move the npm publish to a manually triggered release action which takes a semantic version as user input.
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item
W-16628948