Skip to content

Commit f77eb7c

Browse files
committed
[tailscale] .github: stop using upload-release-asset action
Change to use `action-gh-release` instead of `upload-release-asset` as the repo for `upload-release-asset` is in public archive and recommends swapping over to `action-gh-release`. Updates #47 Signed-off-by: Mario Minardi <[email protected]>
1 parent 7426231 commit f77eb7c

File tree

1 file changed

+10
-28
lines changed

1 file changed

+10
-28
lines changed

.github/workflows/build.yml

+10-28
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,7 @@ jobs:
7373
name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
7474
path: ${{ env.artifacts_path }}/${{ matrix.GOOS }}-${{ matrix.GOARCH }}.tar.gz
7575

76-
create_release:
77-
runs-on: ubuntu-24.04
78-
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
79-
needs: [test, build_release]
80-
outputs:
81-
url: ${{ steps.create_release.outputs.upload_url }}
82-
steps:
83-
- name: create release
84-
id: create_release
85-
uses: actions/create-release@v1
86-
env:
87-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88-
with:
89-
# Release name can't be the same as tag name, sigh
90-
tag_name: build-${{ inputs.ref || github.sha }}
91-
release_name: ${{ inputs.ref || github.sha }}
92-
draft: false
93-
prerelease: true
94-
95-
upload_release:
76+
release:
9677
strategy:
9778
matrix:
9879
GOOS: ["linux", "darwin", "windows"]
@@ -102,21 +83,22 @@ jobs:
10283
GOARCH: arm64
10384
runs-on: ubuntu-24.04
10485
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
105-
needs: [create_release]
86+
needs: [test, build_release]
10687
steps:
10788
- name: download artifact
10889
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
10990
with:
11091
name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
11192
- name: upload artifact
112-
uses: actions/upload-release-asset@v1
113-
env:
114-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
11594
with:
116-
upload_url: ${{ needs.create_release.outputs.url }}
117-
asset_path: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}.tar.gz
118-
asset_name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}.tar.gz
119-
asset_content_type: application/gzip
95+
# Release name can't be the same as tag name, sigh
96+
tag_name: build-${{ inputs.ref || github.sha }}
97+
name: ${{ inputs.ref || github.sha }}
98+
draft: false
99+
prerelease: true
100+
files: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}.tar.gz
101+
token: ${{ secrets.GITHUB_TOKEN }}
120102

121103
clean_old:
122104
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)