diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dde70ae..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 - uses: actions/checkout@v2 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v4 + + - 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