summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yaml46
-rw-r--r--.github/workflows/update-flake.yaml27
2 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..7a5bae0
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,46 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Build Package
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v11
+
+ - name: Setup Magic Nix Cache
+ uses: DeterminateSystems/magic-nix-cache-action@v6
+
+ - name: Run build
+ run: |
+ nix build --print-build-logs --show-trace
+
+ release-gate:
+ name: Release gate
+
+ if: ${{ always() }}
+
+ needs: build
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Exit with error
+ if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
+ run: exit 1
diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml
new file mode 100644
index 0000000..8430a2c
--- /dev/null
+++ b/.github/workflows/update-flake.yaml
@@ -0,0 +1,27 @@
+name: Update flake.lock
+
+on:
+ schedule:
+ # run every saturday
+ - cron: "0 0 * * 6"
+ workflow_dispatch:
+
+jobs:
+ update:
+ name: Run update
+
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: write
+ pull-requests: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v11
+
+ - name: Update lockfile & make PR
+ uses: DeterminateSystems/update-flake-lock@v21