50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Build and Deploy on Tag
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build:
|
|
# The 'container' tag replaces the runner OS; the job runs INSIDE this image
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
# x86_64
|
|
- arch: x64
|
|
image: dockcross/linux-x64
|
|
tripple: x86_64-linux-gnu
|
|
|
|
# ARM 64-bit
|
|
- arch: arm64
|
|
image: dockcross/linux-arm64
|
|
tripple: aarch64-linux-gnu
|
|
|
|
# Apply the matrix image to the job container
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ${{ matrix.image }}
|
|
|
|
|
|
steps:
|
|
- run: |
|
|
apt-get update
|
|
apt-get install -y curl
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y nodejs
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
mkdir artifacts
|
|
mkdir build
|
|
cd build
|
|
cmake -S .. -B . -DCMAKE_TOOLCHAIN_FILE=/usr/lib/${{ matrix.tripple }}/Toolchain.cmake
|
|
make
|
|
mv myapp ../artifacts/myapp-${{ matrix.arch }}
|
|
- uses: akkuman/gitea-release-action@v1
|
|
env:
|
|
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
|
with:
|
|
prerelease: true
|
|
files: |-
|
|
artifacts/** |