summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorseth <[email protected]>2024-04-30 04:07:12 -0400
committerseth <[email protected]>2024-04-30 04:07:12 -0400
commita711dab545e8b964914ac01ed06971a5a37ae22b (patch)
tree2790e4bfbb12a9e64bfa95f9d3759e9fca1dc8f7 /.github/workflows
init
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yaml32
-rw-r--r--.github/workflows/publish.yaml26
2 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..163c10a
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,32 @@
+name: CI
+
+on:
+ push:
+ paths:
+ - '.github/workflows/**'
+ - '**.nix'
+ branches: [main]
+ pull_request:
+ paths:
+ - '.github/workflows/**'
+ - '**.nix'
+ workflow_dispatch:
+
+jobs:
+ test:
+ name: Run tests
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: cachix/install-nix-action@v26
+
+ - name: Build release.nix
+ run: |
+ nix flake check ./test \
+ --print-build-logs \
+ --show-trace
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 0000000..9c546d3
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,26 @@
+name: Publish flake
+
+on:
+ push:
+ tags:
+ - v?[0-9]+.[0-9]+.[0-9]+
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: "The existing tag to publish"
+ type: "string"
+ required: true
+
+jobs:
+ flakestry:
+ name: Publish to flakestry.dev
+
+ runs-on: ubuntu-latest
+
+ permissions:
+ id-token: write
+
+ steps:
+ - uses: flakestry/flakestry-publish@main
+ with:
+ version: "${{ inputs.tag || github.ref_name }}"