ci: publish to flake registries on tag (#183)

This commit is contained in:
seth 2024-05-20 22:25:34 -06:00 committed by GitHub
parent 6f9cb48525
commit 45965e113f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

49
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,49 @@
name: Publish flake
on:
push:
tags: ["v*.*.*"]
workflow_dispatch:
inputs:
tag:
description: "The tag to publish"
type: string
required: true
jobs:
flakehub:
name: FlakeHub
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
- name: Install Nix
uses: cachix/install-nix-action@V27
- name: Push to FlakeHub
uses: DeterminateSystems/flakehub-push@v3
with:
tag: ${{ inputs.tag || github.ref_name }}
visibility: "public"
flakestry:
name: Flakestry
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Publish on Flakestry
uses: flakestry/flakestry-publish@main
with:
version: ${{ inputs.tag || github.ref_name }}