Skip to content

Deploy prebuilt binaries #6

Deploy prebuilt binaries

Deploy prebuilt binaries #6

Workflow file for this run

name: Deploy
run-name: Deploy prebuilt binaries
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
env:
CI: true
NODE_ENV: production
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: macos
os: macos-latest
target: x86_64-apple-darwin
- build: windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get version
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Build
run: cargo build --verbose --release --target ${{ matrix.target }}
- name: Release
uses: actions/upload-artifact@v4
with:
name: xid-${{ env.VERSION }}-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/libxid.so
target/${{ matrix.target }}/release/libxid.dll
target/${{ matrix.target }}/release/libxid.dylib