Skip to content

Build

Build #170

Workflow file for this run

name: Build
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
create-empty-release:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0 # Allows using `git log` to set initial release notes.
- name: Create empty release
shell: bash
run: ./.github/bin/create-empty-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
needs: [create-empty-release]
strategy:
fail-fast: false
matrix:
include:
- os: linux
runs-on: ubuntu-22.04
arch: x86-64
- os: macos
runs-on: macos-12
arch: x86-64
- os: windows
runs-on: windows-2022
arch: x86-64
name: "${{ matrix.os }}-${{ matrix.arch }}"
runs-on: ${{ matrix.runs-on }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: On Linux, install musl
if: matrix.os == 'linux'
run: ./.github/bin/linux-install-musl
- name: Install Nim
uses: iffy/install-nim@ac410af52523f06e0fa037ee81d06ead7b95692c
with:
version: "binary:2.0.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build binary
shell: bash
run: ./.github/bin/build
- name: Upload archive
shell: bash
run: ./.github/bin/upload-archive
env:
OS: ${{ matrix.os }}
ARCH: ${{ matrix.arch }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
cross-compile:
needs: [create-empty-release]
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-22.04
zig_target: aarch64-linux-musl
- runs-on: ubuntu-22.04
zig_target: riscv64-linux-musl
- runs-on: macos-12
zig_target: aarch64-macos-none
- runs-on: windows-2022
zig_target: aarch64-windows-gnu
name: "${{ matrix.zig_target }}"
runs-on: ${{ matrix.runs-on }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Install Nim
uses: iffy/install-nim@ac410af52523f06e0fa037ee81d06ead7b95692c
with:
version: "binary:2.0.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Zig
shell: bash
run: ./.github/bin/install-zig
- name: Cross-compile
shell: bash
run: ./.github/bin/cross-compile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZIG_TARGET: ${{ matrix.zig_target }}
checksums:
needs: [build, cross-compile]
runs-on: ubuntu-22.04
name: Upload signatures and checksums
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Install minisign
run: ./.github/bin/linux-install-minisign
- name: Upload signatures and checksums
run: ./.github/bin/upload-signatures-and-checksums
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIGLET_MINISIGN_SECRET_KEY: ${{ secrets.CONFIGLET_MINISIGN_SECRET_KEY }}