Skip to content

Commit

Permalink
fix: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yuma140902 committed Oct 15, 2023
1 parent 21b0910 commit 94afcfc
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ env:
PJ_NAME: tempura

jobs:
version:
name: Get version from git tag
runs-on: ubuntu-latest
outputs:
version: ${{ steps.s.outputs.tag }}
steps:
- id: s
run: |
tag=${GITHUB_REF#refs/*/}
echo $tag
echo "tag=$tag" >> $GITHUB_OUTPUT
build:
name: Build for ${{ matrix.target }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -90,8 +102,8 @@ jobs:
path: ${{ env.PJ_NAME }}-${{ matrix.target }}.zip

github_release:
name: Make a new GitHub release for ${{ github.ref_name }}
needs: [build]
name: Make a new GitHub release for ${{ needs.version.outputs.version }}
needs: [build, version]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
Expand All @@ -105,10 +117,10 @@ jobs:
with:
files: ${{ env.PJ_NAME }}-*/${{ env.PJ_NAME }}-*
body_path: release-note/RELEASE_NOTE.md
tag_name: ${{ github.ref_name }}
tag_name: ${{ needs.version.outputs.version }}

crates_io_publish:
name: Publish ${{ github.ref_name }} to Crates.io
name: Publish ${{ needs.version.outputs.version }} to Crates.io
needs: [build]
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 94afcfc

Please sign in to comment.