Skip to content

Commit

Permalink
ci: 增加读取最新版本的 release 备注
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoJikun committed Dec 11, 2024
1 parent fd6bc6d commit aceafad
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ jobs:
# if: matrix.settings.target == 'macos-arm'
# run: rustup target add aarch64-apple-darwin

- name: Get latest release
id: get_release
uses: actions/github-script@v4
with:
script: |
const latestRelease = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
});
return latestRelease.data;
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
Expand Down Expand Up @@ -60,7 +71,7 @@ jobs:
with:
args: ${{ matrix.settings.args }}
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: v__VERSION__-beta
releaseBody: "This is a release"
releaseName: v__VERSION__
releaseBody: "${{ steps.get_release.outputs.body }}"
releaseDraft: true
prerelease: false

0 comments on commit aceafad

Please sign in to comment.