Skip to content

Commit

Permalink
action: use softprops/action-gh-release to do release
Browse files Browse the repository at this point in the history
So that we don't rely on the HUB_UPLOAD_TOKEN secret.

Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Apr 7, 2022
1 parent 47ae949 commit af8c466
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,13 @@ jobs:
configs
build-contrib:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.17.x]
env:
DOCKER: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
go-version: '1.17'
- name: cache go mod
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -99,5 +96,12 @@ jobs:
tarball="nydus-static-$tag-x86_64.tgz"
chmod +x nydus-static/*
tar cf - nydus-static | gzip > ${tarball}
echo "uploading ${tarball} for tag $tag ..."
GITHUB_TOKEN=${{ secrets.HUB_UPLOAD_TOKEN }} hub release create -m "Nydus Image Service $tag" -m "Nydus Image Service $tag release" -a "${tarball}" "$tag"
echo "tag=$tag" >> $GITHUB_ENV
echo "tarball=$tarball" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
name: "Nydus Image Service ${{ env.tag }}"
generate_release_notes: true
files:
${{ env.tarball }}

0 comments on commit af8c466

Please sign in to comment.