Skip to content

Commit dd85f77

Browse files
authored
Merge pull request #43 from DeterminateSystems/graham/fh-634-spaghetti-deploy
nix: propose-release workflow, production release
2 parents 863dd70 + 1856f4c commit dd85f77

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/build-publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ on:
55
push:
66
branches:
77
- main
8-
tags:
9-
- "v*.*.*"
108
pull_request:
119
types:
1210
- opened
1311
- reopened
1412
- synchronize
1513
- labeled
14+
release:
15+
types:
16+
- released
1617

1718
jobs:
1819
test-closures:
@@ -75,6 +76,7 @@ jobs:
7576
7677
publish:
7778
needs: [test-closures, test-modules, build-versions-nix]
79+
environment: ${{ github.event_name == 'release' && 'production' || '' }}
7880
runs-on: ubuntu-latest
7981
permissions:
8082
contents: read
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
reference-id:
5+
type: string
6+
required: true
7+
version:
8+
type: string
9+
required: true
10+
nix-version:
11+
type: string
12+
required: true
13+
14+
concurrency:
15+
group: ${{ github.workflow }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
propose-release:
20+
uses: DeterminateSystems/propose-release/.github/workflows/workflow.yml@main
21+
permissions:
22+
id-token: "write"
23+
contents: "write"
24+
pull-requests: write
25+
with:
26+
reference-id: ${{ inputs.reference-id }}
27+
version: ${{ inputs.version }}
28+
extra-commands-early: |
29+
sed -i 's#https://flakehub.com/f/NixOS/nix/=.*";#https://flakehub.com/f/NixOS/nix/=${{ inputs.nix-version }}";#' ./flake.nix
30+
git add flake.nix
31+
git commit -m "Update Nix release to ${{ inputs.nix-version }}" || true

0 commit comments

Comments
 (0)