Skip to content

Commit

Permalink
fix: Switch to the maintained version of create-release action
Browse files Browse the repository at this point in the history
  • Loading branch information
yanliu38 committed Jan 25, 2025
1 parent f60a29e commit 7d4847b
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
create-release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.version }}
changelog: ${{ steps.changelog.outputs.changelog }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -33,20 +33,6 @@ jobs:
cat git-cliff/CHANGELOG.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref_name }}
body: |
## Changelog
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false

build-release:
needs: create-release
strategy:
Expand Down Expand Up @@ -97,19 +83,26 @@ jobs:
cp target/${{ matrix.target }}/release/${{ matrix.binary_name }} ${{ matrix.asset_name }}
fi
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./${{ matrix.asset_name }}
asset_name: ${{ matrix.asset_name }}
asset_content_type: application/octet-stream
name: Release ${{ github.ref_name }}
body: |
## Changelog
${{ needs.create-release.outputs.changelog }}
files: |
${{ matrix.asset_name }}
draft: false
prerelease: false

update-version:
needs: [create-release, build-release]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit 7d4847b

Please sign in to comment.