Skip to content

fix workflow

fix workflow #2

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact_name: rime-deploy-linux
- os: macos-latest
artifact_name: rime-deploy-macos
- os: windows-latest
artifact_name: rime-deploy-windows.exe
steps:
- uses: actions/checkout@v4
- name: Setup Build Environment
shell: bash
run: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y build-essential
fi
- name: Build
shell: bash
run: |
make
mkdir -p artifacts
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp rime-deploy.exe artifacts/${{ matrix.artifact_name }}
else
cp rime-deploy artifacts/${{ matrix.artifact_name }}
chmod +x artifacts/${{ matrix.artifact_name }}
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: rime-deploy-${{ matrix.os }}
path: artifacts/*
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}