diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5c6e2d..1bae063 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,8 +19,8 @@ jobs: # Bump version on merging Pull Requests with specific labels. # (bump:major,bump:minor,bump:patch) - id: bumpr - if: "!startsWith(github.ref, 'refs/tags/')" - uses: haya14busa/action-bumpr@v1 + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + uses: zckv/action-bumpr@v1 # Update corresponding major and minor tag. # e.g. Update v1 and v1.2 when releasing v1.2.3 @@ -32,24 +32,21 @@ jobs: # Get tag name. - id: tag - uses: haya14busa/action-cond@v1 - with: - cond: "${{ startsWith(github.ref, 'refs/tags/') }}" - if_true: ${{ github.ref }} - if_false: ${{ steps.bumpr.outputs.next_version }} + shell: bash + run: | + if [ "${{ startsWith(github.ref, 'refs/tags/') }}" = "true" ]; then + echo "value=${{ github.ref }}" >> "$GITHUB_OUTPUT" + else + echo "value=${{ steps.bumpr.outputs.next_version }}" >> "$GITHUB_OUTPUT" + fi # Create release. - - uses: shogo82148/actions-create-release@v1 - if: "steps.tag.outputs.value != ''" + - name: Release + uses: softprops/action-gh-release@v1 + if: steps.tag.outputs.value != '' with: - # This token is provided by Actions, you do not - # need to create your own token - github_token: ${{ secrets.PAT_TOKEN }} tag_name: ${{ steps.tag.outputs.value }} - release_name: Release ${{ steps.tag.outputs.value }} - body: ${{ steps.bumpr.outputs.message }} - draft: false - prerelease: false + name: Release ${{ steps.tag.outputs.value }} release-check: if: github.event.action == 'labeled' @@ -57,4 +54,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: Post bumpr status comment - uses: haya14busa/action-bumpr@v1 + uses: zckv/action-bumpr@v1