-
Notifications
You must be signed in to change notification settings - Fork 1
ci: bump actions + dynamic go version + auto-release + badge fix #14
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 | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||
| name: release | ||||||
|
|
||||||
| # Auto-cuts a beta prerelease on every main push. | ||||||
| # Tag pushes are ignored so the workflow doesn't recurse. | ||||||
| on: | ||||||
| push: | ||||||
| branches: [main] | ||||||
|
|
||||||
| permissions: | ||||||
| contents: write | ||||||
|
|
||||||
| concurrency: | ||||||
| group: release-main | ||||||
| cancel-in-progress: false | ||||||
|
|
||||||
| jobs: | ||||||
| release: | ||||||
| name: auto-tag + release | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: actions/checkout@v6 | ||||||
|
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Verify mutable action refs in workflow files
fd -p '.github/workflows/*.yml' | xargs rg -nP 'uses:\s*[^@]+@v[0-9]+'
# Expected after hardening: no matchesRepository: RandomCodeSpace/docsiq Length of output: 332 🏁 Script executed: cat -n .github/workflows/release.yml | head -30Repository: RandomCodeSpace/docsiq Length of output: 874 🏁 Script executed: cat -n .github/workflows/release.ymlRepository: RandomCodeSpace/docsiq Length of output: 1701 Pin action to a commit SHA in this write-scoped workflow Line 21 uses a mutable major tag ( 🔒 Suggested hardening- - uses: actions/checkout@v6
+ - uses: actions/checkout@dcd71f646680f2efd8db4ead08a20234aee33c24📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| - name: Compute next beta tag | ||||||
| id: ver | ||||||
| run: | | ||||||
| latest=$(git tag -l 'v0.0.0-beta.*' \ | ||||||
| | grep -E 'v0\.0\.0-beta\.[0-9]+$' \ | ||||||
| | sort -V \ | ||||||
| | tail -1) | ||||||
| if [ -z "$latest" ]; then | ||||||
| next="v0.0.0-beta.1" | ||||||
| else | ||||||
| n=${latest##*.} | ||||||
| next="v0.0.0-beta.$((n+1))" | ||||||
| fi | ||||||
| echo "tag=$next" >> "$GITHUB_OUTPUT" | ||||||
| echo "Next tag: $next" | ||||||
|
|
||||||
| - name: Create tag + release | ||||||
| env: | ||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
| run: | | ||||||
| set -eu | ||||||
| tag="${{ steps.ver.outputs.tag }}" | ||||||
| git tag "$tag" | ||||||
| git push origin "$tag" | ||||||
| gh release create "$tag" \ | ||||||
| --target "${{ github.sha }}" \ | ||||||
| --prerelease \ | ||||||
| --generate-notes \ | ||||||
| --title "$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.
Fixed concurrency group can skip releases for intermediate pushes
Line 13 uses a single workflow-level concurrency key. With GitHub Actions concurrency semantics, older
pendingruns in the same group are replaced by newer queued runs, so not everymainpush will get a prerelease.🤖 Prompt for AI Agents