@@ -3,81 +3,18 @@ name: Release AWS CLI Manager
33
44on :
55 push :
6- # run only against semver tags
7- branches :
8- - main
9-
10- concurrency :
11- group : release-${{ github.ref }}
12- cancel-in-progress : false
6+ branches : [main]
137
148permissions :
159 contents : write
1610
1711jobs :
1812 release :
19- runs-on : ubuntu-latest
20- outputs :
21- new-release : ${{ steps.semantic.outputs.new_release_published }}
22- version : ${{ steps.semantic.outputs.new_release_version }}
23- steps :
24- - uses : actions/create-github-app-token@v2
25- id : app
26- with :
27- app-id : ${{ secrets.DEVOPS_BUDDY_APP_ID }}
28- private-key : ${{ secrets.DEVOPS_BUDDY_PRIVATE_KEY }}
29-
30- - name : Setup Git (bot da App)
31- run : |
32- git config --global user.name "${{ steps.app.outputs.app-slug }}[bot]"
33- git config --global user.email "${{ steps.app.outputs.app-slug }}[bot]@users.noreply.github.com"
34-
35- - uses : actions/checkout@v6
36- with :
37- fetch-depth : 0
38- token : ${{ steps.app.outputs.token }}
39-
40- - uses : actions/setup-node@v6
41- with :
42- node-version : " 24"
43-
44- - id : semantic
45- uses : cycjimmy/semantic-release-action@v4
46- with :
47- extra_plugins : |
48- @semantic-release/changelog
49- @semantic-release/git
50- env :
51- GITHUB_TOKEN : ${{ steps.app.outputs.token }}
52-
53- goreleaser :
54- runs-on : ubuntu-latest
55- needs : release
56- if : needs.release.outputs.new-release == 'true'
57- steps :
58- - uses : actions/create-github-app-token@v2
59- id : app
60- with :
61- app-id : ${{ secrets.DEVOPS_BUDDY_APP_ID }}
62- private-key : ${{ secrets.DEVOPS_BUDDY_PRIVATE_KEY }}
63- repositories : homebrew-tap
64-
65- - uses : actions/checkout@v6
66- with :
67- fetch-depth : 0
68- ref : v${{ needs.release.outputs.version }}
69-
70- - uses : actions/setup-go@v6
71- with :
72- go-version-file : go.mod
73- cache-dependency-path : go.sum
74-
75- - name : Run GoReleaser
76- uses : goreleaser/goreleaser-action@v6
77- with :
78- version : " nightly" # TODO: Remove nightly once v2.14.0 is released
79- args : release --clean
80- env :
81- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82- GORELEASER_CURRENT_TAG : v${{ needs.release.outputs.version }}
83- HOMEBREW_TAP_TOKEN : ${{ steps.app.outputs.token }}
13+ uses : user-cube/reusable-cicd/.github/workflows/golang-cli-apps_release.yml@main
14+ secrets :
15+ DEVOPS_BUDDY_APP_ID : ${{ secrets.DEVOPS_BUDDY_APP_ID }}
16+ DEVOPS_BUDDY_PRIVATE_KEY : ${{ secrets.DEVOPS_BUDDY_PRIVATE_KEY }}
17+ with :
18+ homebrew-tap-repo : " homebrew-tap"
19+ go-version-file : go.mod
20+ go-sum-file : go.sum
0 commit comments