1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Merge pull request #51 from DeterminateSystems/graham/fh-634-spaghetti-deploy

Initial cut of propose-release / release workflows
This commit is contained in:
Graham Christensen 2025-02-21 00:40:47 +00:00 committed by GitHub
commit 90e355784c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 17 deletions

29
.github/workflows/propose-release.yml vendored Normal file
View file

@ -0,0 +1,29 @@
on:
workflow_dispatch:
inputs:
reference-id:
type: string
required: true
version:
type: string
required: true
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
propose-release:
uses: DeterminateSystems/propose-release/.github/workflows/workflow.yml@main
permissions:
id-token: write
contents: write
pull-requests: write
with:
update-flake: false
reference-id: ${{ inputs.reference-id }}
version: ${{ inputs.version }}
extra-commands-early: |
echo ${{ inputs.version }} > .version-determinate
git add .version-determinate
git commit -m "Set .version-determinate to ${{ inputs.version }}"

View file

@ -1,20 +1,23 @@
name: Publish on FlakeHub
name: Release
on:
push:
tags:
- "v*.*.*"
release:
types:
- released
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: "DeterminateSystems/flakehub-push@main"
with:
visibility: "private"
name: "DeterminateSystems/nix-priv"
tag: "${{ github.ref_name }}"
jobs:
publish:
if: (!github.repository.fork && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')))
environment: ${{ github.event_name == 'release' && 'production' || '' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: "DeterminateSystems/flakehub-push@main"
with:
rolling: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
visibility: "private"
tag: "${{ github.ref_name }}"