Skip to content

feat: config validation tooling #39

feat: config validation tooling

feat: config validation tooling #39

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
asset: node-manager-x86_64
- target: aarch64-unknown-linux-musl
asset: node-manager-aarch64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Install cross-compile tools
run: |
sudo apt-get update -q
sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu
- name: Build
run: |
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-musl" ]; then
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc
fi
cargo build --release --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/node-manager ${{ matrix.asset }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ${{ matrix.asset }}
create-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create GitHub Release and Upload Assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# This creates the release and attaches the assets in one atomic transaction!
gh release create "${{ github.ref_name }}" \
--repo "${{ github.repository }}" \
--title "${{ github.ref_name }}" \
--generate-notes \
dist/node-manager-x86_64 dist/node-manager-aarch64