Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Publish tags to Nix registries #14

Merged
merged 16 commits into from
Nov 28, 2023
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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

concurrency:
group: publish
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
# https://flakehub.com/new
flakehub:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v8
- name: Publish flake
uses: DeterminateSystems/flakehub-push@v3
with:
tag: ${{ inputs.tag || github.ref_name }}

# https://flakestry.dev/publish
flakestry:
runs-on: ubuntu-latest
steps:
- name: Publish flake
uses: flakestry/flakestry-publish@main
with:
version: ${{ inputs.tag || github.ref_name }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[![Build](https://github.com/sestrella/asdf2nix/actions/workflows/build.yml/badge.svg)](https://github.com/sestrella/asdf2nix/actions/workflows/build.yml)
[![Release](https://github.com/sestrella/asdf2nix/actions/workflows/release.yml/badge.svg)](https://github.com/sestrella/asdf2nix/actions/workflows/release.yml)
[![Publish](https://github.com/sestrella/asdf2nix/actions/workflows/publish.yml/badge.svg)](https://github.com/sestrella/asdf2nix/actions/workflows/publish.yml)

[![FlakeHub](https://img.shields.io/endpoint?url=https://flakehub.com/f/sestrella/asdf2nix/badge)](https://flakehub.com/flake/sestrella/asdf2nix)
[![flakestry.dev](https://flakestry.dev/api/badge/flake/github/sestrella/asdf2nix)](https://flakestry.dev/flake/github/sestrella/asdf2nix)

asdf2nix is a tool designed for [asdf] users who want to experiment with
nix-shells, as well as former Nix users who want to simplify package version
Expand Down