mirror of
https://github.com/pandorafuture/wx-cli.git
synced 2026-08-29 04:00:55 +00:00
ci: add release workflow for macOS arm64 binary
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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: 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@v2
|
||||
with:
|
||||
files: wx-cli-${{ github.ref_name }}-macos-arm64.tar.gz
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user