mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
workflow updates
This commit is contained in:
parent
a632bb28bb
commit
d9b711add6
4 changed files with 22 additions and 28 deletions
46
.forgejo/workflows/ci.yml
Normal file
46
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
name: "CI"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix flake check --keep-going
|
||||
|
||||
semver:
|
||||
runs-on: nix
|
||||
needs: checks
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix run .#semver-checks
|
||||
|
||||
check-schema:
|
||||
runs-on: nix
|
||||
needs: checks
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- name: Generate schema
|
||||
run: |
|
||||
nix run .#demostf-parser-schema > schema.json
|
||||
nix fmt
|
||||
- run: |
|
||||
git diff
|
||||
git diff-index --quiet HEAD --
|
||||
41
.forgejo/workflows/release.yml
Normal file
41
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
matrix:
|
||||
runs-on: nix
|
||||
outputs:
|
||||
cross-matrix: ${{ steps.set-matrix.outputs.cross-matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: set-matrix
|
||||
run: |
|
||||
echo "cross-matrix={\"include\":$(nix eval --json '.#lib.crossMatrix')}" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
runs-on: nix
|
||||
needs: [matrix]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{fromJson(needs.matrix.outputs.cross-matrix)}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
- run: nix build .#${{ matrix.target }}
|
||||
- name: Upload binary to release
|
||||
uses: https://github.com/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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue