diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-06-25 20:17:53 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-06-25 20:17:53 +0900 |
| commit | 7007bd6a1c022dee1951413b820a54f5b4271bbb (patch) | |
| tree | 98906ff764fcecb9a1ad978b668cf897cfabe0cd /.github | |
| parent | 00efc95ee7a8f344c0ed3770a5383c5690a2f877 (diff) | |
workflows: port release workflow to github
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/README | 1 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/.github/README b/.github/README new file mode 100644 index 00000000..1b99aac5 --- /dev/null +++ b/.github/README @@ -0,0 +1 @@ +This port is solely for releasing to the github mirror and serves no purpose during development.
\ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..dbd35d15 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + name: Create release + runs-on: ubuntu-latest + + permissions: + packages: write + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Nix + uses: nixbuild/nix-quick-install-action@v32 + with: + nix_conf: | + keep-env-derivations = true + keep-outputs = true + + - name: Restore and cache Nix store + uses: nix-community/cache-nix-action@v6 + with: + primary-key: build-${{ runner.os }}-${{ hashFiles('**/*.nix') }} + restore-prefixes-first-match: build-${{ runner.os }}- + gc-max-store-size-linux: 1G + purge: true + purge-prefixes: build-${{ runner.os }}- + purge-created: 60 + purge-primary-key: never + + - name: Build for release + run: nix build --print-out-paths --print-build-logs .#dist + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: |- + result/hakurei-** |
