File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -5,28 +5,32 @@ permissions:
55
66on :
77 push :
8- branches : [ "main" ]
9- push :
10- tags : [ "v*.*.*" ]
8+ branches : ["main"]
9+ tags : ["v*.*.*"]
1110 pull_request :
12- branches : [ "main" ]
11+ branches : ["main"]
1312
1413jobs :
1514 build :
16- if : github.event_name != 'push' || startsWith(github.ref, 'refs/heads/') # فقط برای شاخه main
1715 runs-on : ${{ matrix.os }}
1816 strategy :
1917 matrix :
2018 include :
21- - os : ubuntu-latest; goos: linux; ext: ""
22- - os : windows-latest; goos: windows; ext: ".exe"
23- - os : macos-latest; goos: darwin; ext: ""
19+ - os : ubuntu-latest
20+ goos : linux
21+ ext : " "
22+ - os : windows-latest
23+ goos : windows
24+ ext : " .exe"
25+ - os : macos-latest
26+ goos : darwin
27+ ext : " "
2428 steps :
2529 - uses : actions/checkout@v4
2630 - uses : actions/setup-go@v4
2731 with :
28- go-version : ' 1.23.0'
29- - name : Build
32+ go-version : " 1.23.0"
33+ - name : Build artifact
3034 env :
3135 GOOS : ${{ matrix.goos }}
3236 GOARCH : amd64
@@ -39,17 +43,17 @@ jobs:
3943 path : bin/terminalapp_${{ matrix.goos }}_amd64${{ matrix.ext }}
4044
4145 release :
42- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
4346 needs : build
4447 runs-on : ubuntu-latest
48+ if : startsWith(github.ref, 'refs/tags/')
4549 steps :
4650 - uses : actions/download-artifact@v4
4751 with :
4852 path : ./bin
4953 - uses : softprops/action-gh-release@v1
5054 with :
5155 tag_name : ${{ github.ref_name }}
52- name : Release ${{ github.ref_name }}
56+ name : " Release ${{ github.ref_name }}"
5357 files : ./bin/*
5458 env :
5559 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments