File tree Expand file tree Collapse file tree 1 file changed +20
-26
lines changed
Expand file tree Collapse file tree 1 file changed +20
-26
lines changed Original file line number Diff line number Diff line change 2121 pull_request :
2222 branches :
2323 - " main"
24- types : [closed]
25-
26- permissions :
27- contents : write
24+ types :
25+ - " closed"
2826
2927jobs :
30- goreleaser :
31- if : ${{ github.event.pull_request.merged }}
28+ if : ${{ github.event.pull_request.merged }}
29+ share_version :
3230 runs-on : ubuntu-latest
31+ outputs :
32+ version : " ${{ steps.get_version.outputs.version }}"
3333 steps :
3434 - name : Checkout
3535 uses : actions/checkout@v4
36- - name : Check Dependencies' License
37- uses : apache/skywalking-eyes/dependency@main # always prefer to use a revision instead of `main`.
38- - name : Set up Go
39- uses : actions/setup-go@v5
40- with :
41- go-version : ' >=1.22.5'
42- - name : Run Tests
36+ - name : Get Version
37+ id : get_version
4338 run : |
44- ls -l
45- sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
46- task install
47- source ~/.bashrc
48- ops -version
49- task tests
50- - name : Run GoReleaser
51- uses : goreleaser/goreleaser-action@v6
39+ version="v$(cat version.txt)"
40+ echo "Version: $version"
41+ # Set the version as an output
42+ echo "::set-output name=version::$version"
43+ push_tag :
44+ runs-on : ubuntu-latest
45+ needs : read_version
46+ steps :
47+ - name : Tag commit
48+ uses : tvdias/github-tagger@v0.0.1
5249 with :
53- distribution : goreleaser
54- version : ' ~> v2'
55- args : release --clean
56- env :
57- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ repo-token : " ${{ secrets.GITHUB_TOKEN }}"
51+ tag : " ${{ needs.share_version.outputs.version }}"
You can’t perform that action at this time.
0 commit comments