Files
wx-cli/.github/workflows/release.yml
T
dependabot[bot] 4d8272029c chore(deps): bump softprops/action-gh-release from 2 to 3
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 15:23:31 +00:00

48 lines
1.2 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Extract changelog
id: changelog
run: |
VERSION="${GITHUB_REF_NAME#v}"
BODY=$(awk "/^## \[${VERSION}\]/{found=1; next} /^## \[/{if(found) exit} found{print}" CHANGELOG.md)
{
echo "body<<CHANGELOG_EOF"
echo "$BODY"
echo "CHANGELOG_EOF"
} >> "$GITHUB_OUTPUT"
- name: Build release (arm64)
run: cargo build --release --target aarch64-apple-darwin
- name: Package binary
run: |
cd target/aarch64-apple-darwin/release
chmod +x wx-cli
tar czf wx-cli-${{ github.ref_name }}-macos-arm64.tar.gz wx-cli
mv wx-cli-${{ github.ref_name }}-macos-arm64.tar.gz ${{ github.workspace }}/
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: wx-cli-${{ github.ref_name }}-macos-arm64.tar.gz
body: ${{ steps.changelog.outputs.body }}