|
22 | 22 | - name: Set up Go
|
23 | 23 | uses: actions/setup-go@v4
|
24 | 24 | with:
|
25 |
| - go-version: '1.22.6' |
| 25 | + go-version: "1.22.6" |
26 | 26 |
|
27 | 27 | - name: Build binary
|
28 | 28 | run: |
|
@@ -54,26 +54,15 @@ jobs:
|
54 | 54 | name: binaries
|
55 | 55 |
|
56 | 56 | - name: Create a release in weave-binaries
|
57 |
| - run: | |
58 |
| - RELEASE_ID=$(curl -s -X POST \ |
59 |
| - -H "Authorization: token ${{ secrets.WEAVE_BINARIES_GITHUB_TOKEN }}" \ |
60 |
| - -H "Accept: application/vnd.github.v3+json" \ |
61 |
| - https://api.github.com/repos/initia-labs/weave-binaries/releases \ |
62 |
| - -d '{ |
63 |
| - "tag_name": "${{ github.event.release.tag_name }}", |
64 |
| - "target_commitish": "main", |
65 |
| - "name": "${{ github.event.release.name }}", |
66 |
| - "body": "Release for ${{ github.event.release.tag_name }}", |
67 |
| - "draft": false, |
68 |
| - "prerelease": false |
69 |
| - }' | jq -r '.id') |
70 |
| -
|
71 |
| - for file in build/darwin-amd64/weave build/darwin-arm64/weave build/linux-amd64/weave build/linux-arm64/weave; do |
72 |
| - curl -X POST \ |
73 |
| - -H "Authorization: token ${{ secrets.WEAVE_BINARIES_GITHUB_TOKEN }}" \ |
74 |
| - -H "Content-Type: application/octet-stream" \ |
75 |
| - --data-binary @$file \ |
76 |
| - "https://uploads.github.com/repos/initia-labs/weave-binaries/releases/$RELEASE_ID/assets?name=$(basename $file)" |
77 |
| - done |
78 |
| - env: |
79 |
| - WEAVE_BINARIES_GITHUB_TOKEN: ${{ secrets.WEAVE_BINARIES_GITHUB_TOKEN }} |
| 57 | + uses: softprops/action-gh-release@v2 |
| 58 | + if: startsWith(github.ref, 'refs/tags/') |
| 59 | + with: |
| 60 | + repository: initia-labs/weave-binaries |
| 61 | + draft: false |
| 62 | + prerelease: true |
| 63 | + token: ${{ secrets.WEAVE_BINARIES_GITHUB_TOKEN }} |
| 64 | + files: | |
| 65 | + build/darwin-amd64/weave |
| 66 | + build/darwin-arm64/weave |
| 67 | + build/linux-amd64/weave |
| 68 | + build/linux-arm64/weave |
0 commit comments