mirror of
https://github.com/softinio/Fishee.git
synced 2025-02-22 21:46:05 -08:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Build and Release Artifacts
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build-macos:
|
|
runs-on: macos-15
|
|
strategy:
|
|
matrix:
|
|
arch: [x86_64, arm64]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get swift version
|
|
run: swift --version
|
|
|
|
- name: Build for macOS
|
|
run: |
|
|
swift build -c release --arch ${{ matrix.arch }}
|
|
mkdir -p artifacts/macos-${{ matrix.arch }}
|
|
cp .build/release/fishee artifacts/macos-${{ matrix.arch }}/fishee-macos-${{ matrix.arch }}-${{ github.event.release.tag_name }}
|
|
|
|
- name: Upload macOS artifacts as release assets
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: artifacts/macos-${{ matrix.arch }}/fishee-macos-${{ matrix.arch }}-${{ github.event.release.tag_name }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get swift version
|
|
run: swift --version
|
|
|
|
- name: Build for Linux
|
|
run: |
|
|
swift build -c release
|
|
mkdir -p artifacts/linux
|
|
cp .build/release/fishee artifacts/linux/fishee-linux-${{ github.event.release.tag_name }}
|
|
|
|
- name: Upload Linux artifacts as release assets
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: artifacts/linux/fishee-linux-${{ github.event.release.tag_name }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|