2023-04-30 01:47:01 +03:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v[0-9]+.[0-9]+.[0-9]+
|
2023-08-24 17:23:48 +03:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description: The existing tag to publish to FlakeHub
|
|
|
|
type: string
|
|
|
|
required: true
|
2023-04-30 01:47:01 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2023-08-24 17:23:48 +03:00
|
|
|
if: github.event_name != 'workflow_dispatch'
|
2023-04-30 01:47:01 +03:00
|
|
|
steps:
|
|
|
|
- uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
body: "[CHANGELOG.md](https://github.com/nix-community/nix-init/blob/main/CHANGELOG.md)"
|
2023-08-24 17:23:48 +03:00
|
|
|
|
|
|
|
flakehub:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
id-token: write
|
|
|
|
contents: read
|
|
|
|
steps:
|
2023-09-05 11:32:09 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-24 17:23:48 +03:00
|
|
|
with:
|
|
|
|
ref: ${{ inputs.tag != null && format('refs/tags/{0}', inputs.tag) || '' }}
|
2023-12-06 11:56:10 +03:00
|
|
|
- uses: DeterminateSystems/nix-installer-action@v9
|
2023-08-24 17:23:48 +03:00
|
|
|
- uses: DeterminateSystems/flakehub-push@v3
|
|
|
|
with:
|
|
|
|
visibility: public
|
|
|
|
tag: ${{ inputs.tag }}
|