* Allow builds to use cached Nix packages * Prevent them from running on my VPS * Possibly avoid re-downloading the SVN every single time?
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
"on":
|
|
pull_request:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: bare-metal
|
|
strategy:
|
|
matrix:
|
|
arch:
|
|
- x86
|
|
- ucrt
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Build
|
|
run: nix run -L ".#${{ matrix.arch }}"
|
|
- name: Upload artifact
|
|
uses: https://gitea.com/actions/gitea-upload-artifact@v7
|
|
with:
|
|
name: ${{ matrix.arch }}
|
|
path: "*.tar.xz"
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: nix-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: https://gitea.com/actions/download-artifact@v3-node20
|
|
- id: date
|
|
name: Generate date
|
|
run: |-
|
|
nix build coreutils
|
|
echo "DATE=$(./result/bin/date +'%Y-%m-%d-%H')" >> "$GITHUB_OUTPUT"
|
|
- name: Create release
|
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
|
with:
|
|
tag_name: ${{ steps.date.outputs.DATE }}
|
|
files: |-
|
|
"*.tar.xz"
|