feat: use rust and add cli options #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Action | |
on: | |
pull_request: | |
workflow_call: | |
jobs: | |
build-web: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Print env | |
run: | | |
corepack enable | |
echo "node version:" $(node -v) | |
echo "npm version:" $(npm -v) | |
echo "pnpm version:" $(pnpm -v) | |
- name: Bootstrap | |
run: | | |
make bootstrap-web | |
- name: Build frontend assets | |
run: | | |
make build-web | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: web | |
path: build/static | |
build-binary: | |
runs-on: ${{ matrix.os.name }} | |
needs: build-web | |
strategy: | |
matrix: | |
os: | |
- { name: ubuntu-latest, task: linux } | |
- { name: ubuntu-latest, task: android } | |
- { name: macos-latest, task: darwin } | |
- { name: windows-latest, task: windows } | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Print env | |
run: | | |
corepack enable | |
echo "rustc version:" $(rustc --version) | |
echo "cargo version:" $(cargo --version) | |
- name: Bootstrap | |
run: | | |
make bootstrap-server | |
- name: Download Static files | |
uses: actions/download-artifact@v2 | |
with: | |
name: web | |
path: build/static | |
- name: Build all arch binary | |
run: make build-${{ matrix.os.task }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: arch-${{ matrix.os.task }}-server | |
path: build/arch |