Skip to content

Add CHANGELOG.md

Add CHANGELOG.md #2

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
build:
name: Build (${{ matrix.target }})
needs: test
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
runner: macos-latest
os: macos
- target: x86_64-pc-windows-msvc
runner: windows-latest
os: windows
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}
- name: Package macOS (.dmg)
if: matrix.os == 'macos'
run: |
SKIP_BUILD=1 bash scripts/package-macos.sh ${{ matrix.target }}
- name: Upload macOS artifact
if: matrix.os == 'macos'
uses: actions/upload-artifact@v4
with:
name: Pheasant-${{ matrix.target }}
path: dist/*.dmg
- name: Package Windows (.zip)
if: matrix.os == 'windows'
shell: pwsh
run: |
$version = "${{ github.ref_name }}"
$zipName = "Pheasant-${version}-x86_64-pc-windows-msvc.zip"
New-Item -ItemType Directory -Force -Path dist
$files = @("target/${{ matrix.target }}/release/Pheasant.exe")
$mcpPath = "target/${{ matrix.target }}/release/pheasant-mcp.exe"
if (Test-Path $mcpPath) { $files += $mcpPath }
Compress-Archive -Path $files -DestinationPath "dist/$zipName"
- name: Upload Windows artifact
if: matrix.os == 'windows'
uses: actions/upload-artifact@v4
with:
name: Pheasant-${{ matrix.target }}
path: dist/*.zip
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: ls -R artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: artifacts/*