@@ -2,104 +2,79 @@ name: Build and Release
2
2
3
3
on :
4
4
release :
5
- types : [published]
5
+ types :
6
+ - published
6
7
7
8
jobs :
8
9
build :
9
10
permissions : write-all
10
11
runs-on : ubuntu-latest
11
12
12
13
steps :
13
- - name : Checkout repository
14
- uses : actions/checkout@v2
14
+ - name : Checkout repository
15
+ uses : actions/checkout@v4
15
16
16
- - name : Set up Go
17
- uses : actions/setup-go@v2
18
- with :
19
- go-version : ' 1.22'
17
+ - name : Set up Go
18
+ uses : actions/setup-go@v5
19
+ with :
20
+ go-version : ' 1.22'
20
21
21
- - name : Build for Linux
22
- run : |
23
- GOOS=linux GOARCH=amd64 go build -o modular-indexer-light .
24
- zip modular-indexer-light-linux-amd64.zip config.example.json modular-indexer-light run.sh
22
+ - name : Build for Linux
23
+ run : |
24
+ make GOOS=linux GOARCH=amd64
25
+ zip modular-indexer-light-linux-amd64.zip config.example.json modular-indexer-light run.sh
25
26
26
- - name : Build for macOS amd64
27
- run : |
28
- GOOS=darwin GOARCH=amd64 go build -o modular-indexer-light .
29
- zip modular-indexer-light-darwin-amd64.zip config.example.json modular-indexer-light run.sh
27
+ - name : Build for macOS amd64
28
+ run : |
29
+ make GOOS=darwin GOARCH=amd64
30
+ zip modular-indexer-light-darwin-amd64.zip config.example.json modular-indexer-light run.sh
30
31
31
- - name : Build for macOS arm64
32
- run : |
33
- GOOS=darwin GOARCH=arm64 go build -o modular-indexer-light .
34
- zip modular-indexer-light-darwin-arm64.zip config.example.json modular-indexer-light run.sh
32
+ - name : Build for macOS arm64
33
+ run : |
34
+ make GOOS=darwin GOARCH=arm64
35
+ zip modular-indexer-light-darwin-arm64.zip config.example.json modular-indexer-light run.sh
35
36
36
- - name : Build for Windows
37
- run : |
38
- GOOS=windows GOARCH=amd64 go build -o modular-indexer-light.exe .
39
- zip modular-indexer-light-windows-amd64.zip config.example.json modular-indexer-light.exe run.bat
37
+ - name : Build for Windows
38
+ run : |
39
+ make GOOS=windows GOARCH=amd64
40
+ zip modular-indexer-light-windows-amd64.zip config.example.json modular-indexer-light.exe run.bat
40
41
41
- # - name: Release
42
- # uses: softprops/action-gh-release@v2
43
- # if: startsWith(github.ref, 'refs/tags/')
44
- # with:
45
- # prerelease: false
46
- # make_latest: "true"
47
- # generate_release_notes: true
48
- # files: |
49
- # light-indexer-linux-amd64.zip
50
- # light-indexer-darwin-amd64.zip
51
- # light-indexer-windows-amd64.zip
42
+ - name : Upload Release Assets linux
43
+ uses : actions/upload-release-asset@v1
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ with :
47
+ upload_url : ${{ github.event.release.upload_url }}
48
+ asset_path : ./modular-indexer-light-linux-amd64.zip
49
+ asset_name : modular-indexer-light-linux-amd64.zip
50
+ asset_content_type : application/zip
52
51
53
- # - name: Create Release
54
- # id: create_release
55
- # uses: actions/create-release@v1
56
- # env:
57
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
- # with:
59
- # tag_name: ${{ github.ref }}
60
- # release_name: Release ${{ github.ref }}
61
- # body: |
62
- # Changes in this release:
63
- # - Describe your changes here
64
- # draft: false
65
- # prerelease: false
52
+ - name : Upload Release Assets darwin amd64
53
+ uses : actions/upload-release-asset@v1
54
+ env :
55
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
+ with :
57
+ upload_url : ${{ github.event.release.upload_url }}
58
+ asset_path : ./modular-indexer-light-darwin-amd64.zip
59
+ asset_name : modular-indexer-light-darwin-amd64.zip
60
+ asset_content_type : application/zip
66
61
67
- - name : Upload Release Assets linux
68
- uses : actions/upload-release-asset@v1
69
- env :
70
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71
- with :
72
- upload_url : ${{ github.event.release.upload_url }}
73
- asset_path : ./modular-indexer-light-linux-amd64.zip
74
- asset_name : modular-indexer-light-linux-amd64.zip
75
- asset_content_type : application/zip
76
-
77
- - name : Upload Release Assets darwin amd64
78
- uses : actions/upload-release-asset@v1
79
- env :
80
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
- with :
82
- upload_url : ${{ github.event.release.upload_url }}
83
- asset_path : ./modular-indexer-light-darwin-amd64.zip
84
- asset_name : modular-indexer-light-darwin-amd64.zip
85
- asset_content_type : application/zip
62
+ - name : Upload Release Assets darwin arm64
63
+ uses : actions/upload-release-asset@v1
64
+ env :
65
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66
+ with :
67
+ upload_url : ${{ github.event.release.upload_url }}
68
+ asset_path : ./modular-indexer-light-darwin-arm64.zip
69
+ asset_name : modular-indexer-light-darwin-arm64.zip
70
+ asset_content_type : application/zip
86
71
87
- - name : Upload Release Assets darwin arm64
88
- uses : actions/upload-release-asset@v1
89
- env :
90
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91
- with :
92
- upload_url : ${{ github.event.release.upload_url }}
93
- asset_path : ./modular-indexer-light-darwin-arm64.zip
94
- asset_name : modular-indexer-light-darwin-arm64.zip
95
- asset_content_type : application/zip
96
-
97
- - name : Upload Release Assets windows
98
- uses : actions/upload-release-asset@v1
99
- env :
100
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101
- with :
102
- upload_url : ${{ github.event.release.upload_url }}
103
- asset_path : ./modular-indexer-light-windows-amd64.zip
104
- asset_name : modular-indexer-light-windows-amd64.zip
105
- asset_content_type : application/zip
72
+ - name : Upload Release Assets windows
73
+ uses : actions/upload-release-asset@v1
74
+ env :
75
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
+ with :
77
+ upload_url : ${{ github.event.release.upload_url }}
78
+ asset_path : ./modular-indexer-light-windows-amd64.zip
79
+ asset_name : modular-indexer-light-windows-amd64.zip
80
+ asset_content_type : application/zip
0 commit comments