File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 env :
4646 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4747
48+ update-version :
49+ needs : goreleaser
50+ runs-on : ubuntu-latest
51+ steps :
52+ - name : Get tag
53+ id : tag
54+ run : |
55+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
56+ echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
57+ else
58+ echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
59+ fi
60+
61+ - name : Checkout main
62+ uses : actions/checkout@v6
63+ with :
64+ ref : main
65+
66+ - name : Update version.go
67+ run : |
68+ TAG="${{ steps.tag.outputs.tag }}"
69+ VERSION="${TAG#v}"
70+ sed -i "s/version = \".*\"/version = \"${VERSION}-dev\"/" internal/cmd/version.go
71+ cat internal/cmd/version.go
72+
73+ - name : Commit and push
74+ run : |
75+ git config user.name "github-actions[bot]"
76+ git config user.email "github-actions[bot]@users.noreply.github.com"
77+ git add internal/cmd/version.go
78+ git diff --cached --quiet && exit 0
79+ git commit -m "chore: bump version to ${{ steps.tag.outputs.tag }}-dev"
80+ git push origin main
81+
4882 update-homebrew :
4983 needs : goreleaser
5084 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments