Skip to content

Commit b4d17eb

Browse files
committed
Fix github release
1 parent 9822198 commit b4d17eb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/build-release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build Release
22
on:
33
release:
4-
types: [ created, published, edited ]
4+
types: [ published, edited ]
55

66
jobs:
77
build:
@@ -30,13 +30,22 @@ jobs:
3030
GOOS: ${{ matrix.goos }}
3131
run: go build -o traffic-simulator_${{ matrix.goos }}_${{ matrix.goarch }} .
3232

33+
- name: Get release
34+
id: get_release
35+
uses: PouuleT/get-release-action@master
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Test release
40+
run: echo "${{ steps.get_release.outputs.upload_url }}"
41+
3342
- name: Upload Release Asset
3443
id: upload-release-asset
3544
uses: actions/upload-release-asset@v1
3645
env:
3746
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3847
with:
39-
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ github.ref }}/assets{?name,label}
48+
upload_url: ${{ steps.get_release.outputs.upload_url }}
4049
asset_path: traffic-simulator_${{ matrix.goos }}_${{ matrix.goarch }}
4150
asset_name: traffic-simulator_${{ matrix.goos }}_${{ matrix.goarch }}
4251
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)