Skip to content

Commit

Permalink
ci: publish releases to flakehub
Browse files Browse the repository at this point in the history
  • Loading branch information
figsoda committed Aug 24, 2023
1 parent 134220e commit aef1a08
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:
inputs:
tag:
description: The existing tag to publish to FlakeHub
type: string
required: true

jobs:
create_release:
Expand All @@ -19,6 +25,7 @@ jobs:
name: release
needs: create_release
runs-on: ${{ matrix.os }}
if: github.event_name != 'workflow_dispatch'
strategy:
matrix:
include:
Expand Down Expand Up @@ -58,6 +65,7 @@ jobs:
name: artifacts
needs: create_release
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'

steps:
- name: Checkout
Expand All @@ -82,3 +90,18 @@ jobs:
tag: ${{ github.ref }}
file: artifacts/*
file_glob: true

flakehub:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.tag != null && format('refs/tags/{0}', inputs.tag) || '' }}
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/flakehub-push@v3
with:
visibility: public
tag: ${{ inputs.tag }}

0 comments on commit aef1a08

Please sign in to comment.