Skip to content

ci: add build workflow #1

ci: add build workflow

ci: add build workflow #1

Workflow file for this run

name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
nix_build_static:
strategy:
max-parallel: 4
matrix:
prefix: [static, ipv6-static]
arch: [x86_64, aarch64]
runs-on: ubuntu-latest
env:
package_name: ${{ matrix.prefix }}-${{ matrix.arch }}-unknown-linux-musl
filename: einat-${{ matrix.prefix }}-${{ matrix.arch }}-unknown-linux-musl
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
sandbox = false # can't install in act without this
- name: Nix build
run: nix build .#${{ env.package_name }} && cp ./result/bin/einat ${{ env.filename }}
- if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.filename }}
path: ${{ env.filename }}
release:
if: startsWith(github.ref, 'refs/tags/')
needs: nix_build_static
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
path: builds

Check failure on line 46 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 46, Col: 9): Unexpected value 'path'
- name: Release with builds
uses: softprops/action-gh-release@v2
with:
files: builds/*
draft: true
# TODO: fill release body with changelog