workflow updates

This commit is contained in:
Robin Appelman 2025-05-26 18:45:48 +02:00
commit fea1e1d4de
4 changed files with 82 additions and 110 deletions

47
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,47 @@
on: [push, pull_request]
name: CI
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
build:
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 build .#x86_64-unknown-linux-musl
- uses: forgejo/upload-artifact@v4
with:
name: logsmash-x86_64-unknown-linux-musl
path: result/bin/logsmash
- run: nix build .#x86_64-pc-windows-gnu
- uses: forgejo/upload-artifact@v4
with:
name: logsmash-x86_64-pc-windows-gnu
path: result/bin/logsmash.exe
build-nixpkgs:
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 build .#logsmash

View file

@ -0,0 +1,35 @@
name: Release
on:
release:
types: [created]
permissions:
contents: write
jobs:
build:
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 build .#x86_64-unknown-linux-musl
- name: Upload binary to release
uses: https://github.com/svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: result/bin/logsmash
asset_name: logsmash-x86_64-unknown-linux-musl
tag: ${{ github.ref }}
- run: nix build .#x86_64-pc-windows-gnu
- name: Upload binary to release
uses: https://github.com/svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: result/bin/logsmash.exe
asset_name: logsmash-x86_64-pc-windows-gnu.exe
tag: ${{ github.ref }}