File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ strategy :
12
+ matrix :
13
+ goos : [linux, darwin]
14
+ goarch : [amd64, arm64]
15
+ steps :
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v3
18
+ with :
19
+ go-version : ' ^1.21' # Use the latest Go version
20
+
21
+ - name : Check out code
22
+ uses : actions/checkout@v3
23
+
24
+ - name : Get dependencies
25
+ run : go mod download
26
+
27
+ - name : Build
28
+ run : GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o pathfinder-${{ matrix.goos }}-${{ matrix.goarch }} .
29
+
30
+ - name : Create Release
31
+ id : create_release
32
+ uses : actions/create-release@v1
33
+ env :
34
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ with :
36
+ tag_name : ${{ github.ref }}
37
+ release_name : Release ${{ github.ref }}
38
+ draft : false
39
+ prerelease : false
40
+
41
+ - name : Upload Release Asset
42
+ id : upload-release-asset
43
+ uses : actions/upload-release-asset@v1
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ with :
47
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
48
+ asset_path : ./pathfinder-${{ matrix.goos }}-${{ matrix.goarch }}
49
+ asset_name : pathfinder-${{ matrix.goos }}-${{ matrix.goarch }}
50
+ asset_content_type : application/octet-stream
You can’t perform that action at this time.
0 commit comments