-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: publish to flake registries on tag (#183)
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |