-
Notifications
You must be signed in to change notification settings - Fork 27
Implement GitHub release step in CI workflow #350
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -94,3 +94,37 @@ jobs: | |||||
| - name: Publish to npm | ||||||
| if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||||||
| run: npm publish --tag latest | ||||||
|
|
||||||
| github-release: | ||||||
| needs: [npm-publish-latest] | ||||||
| runs-on: ubuntu-latest | ||||||
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||||||
| permissions: | ||||||
| contents: write | ||||||
| steps: | ||||||
| - uses: actions/checkout@v6 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| - name: Compute release tag from package version | ||||||
| id: release_tag | ||||||
| run: echo "tag=v$(node -p \"require('./package.json').version\")" >> "$GITHUB_OUTPUT" | ||||||
|
|
||||||
|
Comment on lines
+109
to
+112
|
||||||
| - name: Create GitHub release with generated notes | ||||||
| env: | ||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
| run: | | ||||||
| TAG="v$(node -p "require('./package.json').version")" | ||||||
|
||||||
| TAG="v$(node -p "require('./package.json').version")" | |
| TAG="${{ steps.release_tag.outputs.tag }}" |
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.
actions/checkoutis referenced by a mutable major tag (@v6). For stronger supply-chain security and reproducibility, pin this action to a specific commit SHA (or at least a well-known stable major used elsewhere in the org) rather than a floating major tag.