1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 10:34:11 +02:00
parser/.github/workflows/release.yml
2025-02-19 20:42:56 +01:00

43 lines
1.2 KiB
YAML

name: Release
on:
release:
types: [created]
permissions:
contents: write
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
cross-matrix: ${{ steps.set-matrix.outputs.cross-matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- id: set-matrix
run: |
echo "cross-matrix={\"include\":$(nix eval --json '.#lib.crossMatrix')}" | tee -a $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: [matrix]
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix.outputs.cross-matrix)}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: icewind1991/attic-action@v1
with:
name: ci
instance: https://cache.icewind.me
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix build .#${{ matrix.target }}
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: result/bin/parse_demo${{ matrix.binary-suffix }}
asset_name: parser-${{ matrix.target }}${{ matrix.binary-suffix }}
tag: ${{ github.ref }}