@@ -9,43 +9,20 @@ permissions:
99 contents : read
1010
1111jobs :
12- semantic-release :
13- runs-on : ubuntu-latest
14- permissions :
15- contents : write
16- issues : write
17- pull-requests : write
18- outputs :
19- release-version : ${{ steps.semantic.outputs.release-version }}
20- new-release-published : ${{ steps.semantic.outputs.new-release-published }}
21- steps :
22- - name : Harden the runner (Audit all outbound calls)
23- uses : step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
24- with :
25- egress-policy : audit
26-
27- # Mint a GitHub App installation token for the Flanksource App so
28- # semantic-release can push the release tag and create the GitHub Release.
29- # The default GITHUB_TOKEN is blocked from these writes by org policy.
30- - name : Generate GitHub App token
31- id : app-token
32- uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
33- with :
34- app-id : ${{ secrets.FLANKSOURCE_APP_ID }}
35- private-key : ${{ secrets.FLANKSOURCE_APP_SECRET }}
36-
37- - uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
38- with :
39- token : ${{ steps.app-token.outputs.token }}
40- - uses : codfish/semantic-release-action@b621d34fabe0940f031e89b6ebfea28322892a10 # v3.5.0
41- id : semantic
42- env :
43- GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
12+ # Releases go through the shared Flanksource workflow rather than a
13+ # repo-local semantic-release job. The previous codfish/semantic-release-action
14+ # was blocked by GitHub for a ToS violation on 2026-06-25, which failed every
15+ # release from then on while resolving actions ("Repository access blocked").
16+ create-release :
17+ permissions : {}
18+ uses : flanksource/action-workflows/.github/workflows/create-release.yml@5d7f5f3616936fd703e58c5ee7e4527dc9f6adcc # main
19+ secrets :
20+ token : ${{ secrets.FLANKBOT }}
4421
4522 bump-clients :
4623 runs-on : ubuntu-latest
47- needs : [semantic -release]
48- if : needs.semantic -release.outputs.new-release- published == 'true'
24+ needs : [create -release]
25+ if : needs.create -release.outputs.published == 'true'
4926 strategy :
5027 matrix :
5128 repos : ["duty"]
7653 run : |
7754 # Sleep to let index refresh
7855 sleep 60
79- go get github.com/flanksource/commons@v${{ needs.semantic -release.outputs.release- version }}
56+ go get github.com/flanksource/commons@v${{ needs.create -release.outputs.version }}
8057 go mod tidy
8158 if [ -d "hack/generate-schemas" ]; then
8259 cd hack/generate-schemas && go mod tidy
8764 uses : peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
8865 with :
8966 branch : " bump-duty-auto-pr"
90- commit-message : " chore: bump duty to v${{ needs.semantic -release.outputs.release- version }}"
91- title : " chore: bump duty to v${{ needs.semantic -release.outputs.release- version }}"
67+ commit-message : " chore: bump duty to v${{ needs.create -release.outputs.version }}"
68+ title : " chore: bump duty to v${{ needs.create -release.outputs.version }}"
9269 token : ${{ secrets.FLANKBOT }}
9370 labels : dependencies
9471
10380
10481 hx-binaries :
10582 runs-on : ${{ matrix.os }}
106- needs : [semantic -release]
107- if : needs.semantic -release.outputs.new-release- published == 'true'
83+ needs : [create -release]
84+ if : needs.create -release.outputs.published == 'true'
10885 strategy :
10986 matrix :
11087 include :
@@ -136,8 +113,14 @@ jobs:
136113 with :
137114 go-version : v1.25.x
138115
116+ # GOOS/GOARCH have to be exported: cmd/hx/Makefile derives the binary's
117+ # .exe suffix from $(GOOS), so without them the Windows build writes `hx`
118+ # rather than the `hx.exe` the rename step below expects.
139119 - name : Build hx
140- run : make -C cmd/hx build VERSION=${{ needs.semantic-release.outputs.release-version }}
120+ env :
121+ GOOS : ${{ matrix.goos }}
122+ GOARCH : ${{ matrix.goarch }}
123+ run : make -C cmd/hx build VERSION=${{ needs.create-release.outputs.version }}
141124
142125 - name : Rename binary (unix)
143126 if : matrix.goos != 'windows'
@@ -155,7 +138,7 @@ jobs:
155138
156139 hx-upload-release :
157140 runs-on : ubuntu-latest
158- needs : [semantic -release, hx-binaries]
141+ needs : [create -release, hx-binaries]
159142 permissions :
160143 contents : write
161144 steps :
@@ -175,4 +158,4 @@ jobs:
175158 env :
176159 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
177160 GH_REPO : ${{ github.repository }}
178- run : gh release upload "v ${{ needs.semantic -release.outputs.release-version }}" dist/hx_* --clobber
161+ run : gh release upload "${{ needs.create -release.outputs.tag }}" dist/hx_* --clobber
0 commit comments