diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-06-27 20:38:21 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-06-27 20:38:56 +0900 |
| commit | 394bf00ce1cfd2d6899df568c3338509d6acd490 (patch) | |
| tree | 9ad248ad2831767015cd580f9c498e84df0f60e6 /.gitea | |
| parent | 42c21ad90626346277861471b1d6896a4e2e5058 (diff) | |
workflows: workflows via nix
Diffstat (limited to '.gitea')
| -rw-r--r-- | .gitea/workflows/static.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.gitea/workflows/static.yml b/.gitea/workflows/static.yml new file mode 100644 index 00000000..676262c0 --- /dev/null +++ b/.gitea/workflows/static.yml @@ -0,0 +1,39 @@ +name: Static + +on: + - push + - pull_request + +jobs: + check: + name: Flake checks + runs-on: nix + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Run checks + run: nix --print-build-logs --experimental-features 'nix-command flakes' flake check + + dist: + name: Create distribution + runs-on: nix + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Process static files + id: static-test + run: >- + export HAKUREI_REV="$(git rev-parse --short HEAD)" && + sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' package.nix && + nix build --print-out-paths --print-build-logs .#hakurei-static && + mv package.nix.old package.nix && + echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT + + - name: Upload static files + uses: actions/upload-artifact@v3 + with: + name: "hakurei.app-${{ steps.static-test.outputs.rev }}" + path: result/* + retention-days: 1 |
