Skip to content

Commit

Permalink
ci: add publish workflow (#25)
Browse files Browse the repository at this point in the history
registries are nice for people who use tagged releases
  • Loading branch information
getchoo authored Nov 9, 2024
1 parent 0ff3584 commit e061715
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit e061715

Please sign in to comment.