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 <bergwolf@hyper.sh>
  • Loading branch information
bergwolf committed Apr 7, 2022
1 parent 47ae949 commit 317ecfc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
- name: Cache Nydus
uses: Swatinem/rust-cache@v1
with:
target-dir: ./target-fusedev
target-dir: |
./target-fusedev
./target-virtiofs
cache-on-failure: true
- name: Cache Docker Layers
uses: satackey/action-docker-layer-caching@v0.0.11
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
- name: Cache cargo
uses: Swatinem/rust-cache@v1
with:
target-dir: ./target-fusedev
target-dir: |
./target-fusedev
./target-virtiofs
cache-on-failure: true
- name: Build nydus-rs
run: |
Expand All @@ -42,16 +44,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 +98,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 317ecfc

Please sign in to comment.