summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2024-11-08 20:52:14 -0500
committerGitHub <[email protected]>2024-11-08 20:52:14 -0500
commite06171510075d13bc3246692aaad4877055e748b (patch)
treed4fa37f1fd2e7dae155d58fdab687bec13a0f4fb
parent0ff35842087b3b16e7e41caa6f794151b47f304a (diff)
ci: add publish workflow (#25)v0.1.0
registries are nice for people who use tagged releases
-rw-r--r--.github/workflows/publish.yml61
1 files changed, 61 insertions, 0 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..3979f83
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,61 @@
+name: Publish
+
+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:
+ flakehub:
+ name: Publish to FlakeHub
+
+ runs-on: ubuntu-latest
+
+ permissions:
+ id-token: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.tag }}
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v15
+
+ - name: Push to FlakeHub
+ uses: DeterminateSystems/flakehub-push@v5
+ with:
+ tag: ${{ inputs.tag }}
+ visibility: "public"
+
+ flakestry:
+ name: Publish to Flakestry
+
+ runs-on: ubuntu-latest
+
+ permissions:
+ id-token: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.tag }}
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v15
+
+ - name: Push to Flakestry
+ # Flakestry sometimes sends bad responses even when
+ # the flake *has* been published
+ continue-on-error: true
+ uses: flakestry/flakestry-publish@main
+ with:
+ version: ${{ inputs.tag }}