Skip to content

chore: update details #17

chore: update details

chore: update details #17

Workflow file for this run

name: Build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: [x86_64, aarch64]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build backend
run: cargo build
- name: Upload artifact (Linux)
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
uses: actions/upload-artifact@v3
with:
name: ubuntu-latest-romichan-server
path: target/debug/server
- name: Upload artifact (Linux aarch64)
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64'
uses: actions/upload-artifact@v3
with:
name: ubuntu-latest-romichan-server-aarch64
path: target/debug/server
- name: Upload artifact (macOS)
if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64'
uses: actions/upload-artifact@v3
with:
name: macos-latest-romichan-server
path: target/debug/server
- name: Upload artifact (macOS aarch64)
if: matrix.os == 'macos-latest' && matrix.arch == 'aarch64'
uses: actions/upload-artifact@v3
with:
name: macos-latest-romichan-server-aarch64
path: target/debug/server
- name: Upload artifact (Windows)
if: matrix.os == 'windows-latest' && matrix.arch == 'x86_64'
uses: actions/upload-artifact@v3
with:
name: windows-latest-romichan-server
path: target/debug/server.exe
- name: Upload artifact (Windows aarch64)
if: matrix.os == 'windows-latest' && matrix.arch == 'aarch64'
uses: actions/upload-artifact@v3
with:
name: windows-latest-romichan-server-aarch64
path: target/debug/server.exe
- name: Set up Node.js
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
uses: pnpm/action-setup@v2
with:
version: 9
- name: Build frontend
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
run: |
pnpm install --no-frozen-lockfile
cd client
pnpm build
tar -czf dist.tar.gz dist/client
cd ../
- name: Upload artifact (Frontend)
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
uses: actions/upload-artifact@v3
with:
name: romichan-client
path: client/dist.tar.gz