From 43fcb3525c25da4ae2acc7871dd896a6f7b48b67 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 31 May 2024 11:26:30 +0800 Subject: [PATCH] chore: Update release workflow --- .github/workflows/release.yaml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 84f3691..84136de 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,25 +1,28 @@ +name: Release + on: push: - # Sequence of patterns matched against refs/tags tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v1.0.0 - -name: Release + - "v*.*.*" jobs: - release: - name: Release + build: runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get the version + id: get_version + if: startsWith(github.ref, 'refs/tags/') + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + + - name: Release + uses: softprops/action-gh-release@v2 with: + token: ${{ secrets.GITHUB_TOKEN }} tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + name: Release ${{ steps.get_version.outputs.VERSION }} draft: false - prerelease: false \ No newline at end of file + prerelease: false + generate_release_notes: true \ No newline at end of file