Skip to content

Commit

Permalink
ci: publish to flake registries on tag (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo authored May 21, 2024
1 parent 6f9cb48 commit 45965e1
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 45965e1

Please sign in to comment.