-
Notifications
You must be signed in to change notification settings - Fork 682
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
semantic-release optims #1545
semantic-release optims #1545
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ae4179c:
|
f35d582
to
d7e1b8a
Compare
d7e1b8a
to
78e2759
Compare
78e2759
to
ae4179c
Compare
release: | ||
needs: main | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'pmndrs/drei' && contains('refs/heads/master,refs/heads/beta,refs/heads/alpha',github.ref) && github.event_name == 'push' }} |
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.
there is actually no need to check:
contains('refs/heads/master,refs/heads/beta,refs/heads/alpha',github.ref)
because semantic-release won't release any branch that is not declared inrelease.config.js
.branches
github.event_name == 'push'
because semantic-release will always ignore PR:This run was triggered by a pull request and therefore a new version won't be published.
- name: 🚀 Release | ||
uses: cycjimmy/semantic-release-action@v3 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/git | ||
branches: | | ||
[ | ||
'master', | ||
{name: 'beta', prerelease: true}, | ||
{name: 'alpha', prerelease: true} | ||
] |
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.
I've replaced this by local semantic-release
devDependencies package
@@ -9,12 +10,5 @@ module.exports = { | |||
}, | |||
], | |||
'@semantic-release/github', | |||
[ |
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 actually do not use that plugin, since we do not want package.json's version to be committed back into the repository:
Line 3 in 290272d
"version": "0.0.0-semantic-release", |
because it is handled by semantic-release on its own: https://semantic-release.gitbook.io/semantic-release/support/faq#why-is-the-package.jsons-version-not-updated-in-my-repository and there is no need for
] | ||
- run: yarn install | ||
- run: yarn build-storybook | ||
# semantic-release skips not configured branches(see: release.config.js) or pull-requests |
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 securely execute yarn release
here, because semantic-release will not make a release for PRs or not configured pushed-branches: this simplifies the workflow a lot, and removes the whole release
job, since it is now the same as the one for PRs
🎉 This PR is included in version 9.77.11-canary-branches.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 9.77.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Why / What
semantic-release
package (rather than 3rd-partycycjimmy/semantic-release-action
)Checklist
Documentation updated (example)Storybook entry added (example)