-
-
Notifications
You must be signed in to change notification settings - Fork 0
Release v0.2.0 #39
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
Release v0.2.0 #39
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 |
|---|---|---|
|
|
@@ -4,6 +4,17 @@ on: | |
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Tag to release (e.g. v0.2.0)' | ||
| required: true | ||
| type: string | ||
| dry_run: | ||
| description: 'Skip publishing (dry run)' | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
|
|
||
| jobs: | ||
| release: | ||
|
|
@@ -18,7 +29,7 @@ jobs: | |
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@41dfa10bef8ca8f7c4c7cec63b269ccb8a9156b9 # v6 | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache-dependency-path: go.sum | ||
|
|
@@ -30,23 +41,27 @@ jobs: | |
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Resolve tag | ||
| id: resolve_tag | ||
| run: echo "tag=${{ github.event.inputs.tag || github.ref_name }}" >> "$GITHUB_OUTPUT" | ||
| - name: Verify changie release notes exist | ||
| run: | | ||
| if [ ! -f "changes/${{ github.ref_name }}.md" ]; then | ||
| echo "::error::Changie fragment changes/${{ github.ref_name }}.md not found." | ||
| echo "::error::Run 'changie batch ${{ github.ref_name }}' and 'changie merge' before pushing the tag." | ||
| if [ ! -f "changes/${{ steps.resolve_tag.outputs.tag }}.md" ]; then | ||
| echo "::error::Changie fragment changes/${{ steps.resolve_tag.outputs.tag }}.md not found." | ||
| echo "::error::Run 'changie batch ${{ steps.resolve_tag.outputs.tag }}' and 'changie merge' before pushing the tag." | ||
| exit 1 | ||
| fi | ||
| - name: Execute GoReleaser | ||
| uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # goreleaser-action v7 | ||
| with: | ||
| distribution: goreleaser | ||
| version: "~> v2" | ||
| args: release --clean --release-notes changes/${{ github.ref_name }}.md | ||
| args: release --clean --release-notes changes/${{ steps.resolve_tag.outputs.tag }}.md ${{ github.event.inputs.dry_run == 'true' && '--skip-publish' || '' }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Upload assets | ||
| uses: actions/upload-artifact@5d5df5e032fcb57d3c9d9901e9b8f8b2b7d8051a # v7 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 issue (security): Using a version tag instead of a commit SHA for As with |
||
| if: ${{ github.event.inputs.dry_run != 'true' }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: devcloud | ||
| path: dist/* | ||
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.
🚨 issue (security): Switching from a pinned SHA to a floating action tag weakens supply-chain security.
Using
@v6means any future (including breaking or compromised) releases ofactions/setup-gowill be used automatically. Please pin to a specific commit SHA (and optionally note the version in a comment) to keep builds deterministic and limit supply-chain risk. A tool like Dependabot can then update the pinned SHA in a controlled way.