Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/propose-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
workflow_dispatch:
inputs:
reference-id:
type: string
required: true
version:
type: string
required: true
nix-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:
reference-id: ${{ inputs.reference-id }}
version: ${{ inputs.version }}
extra-commands-early: |
for fname in $(find ./tests/fixtures -name '*.json'); do
cat "$fname" \
| jq '.version = $version' --arg version "$version" \
> "$fname.next"
mv "$fname.next" "$fname"
git add "$fname"
done
git commit -m "Update test fixtures with the new nix-installer version" || true

sed -ix 's#https://flakehub.com/f/DeterminateSystems/nix/=.*";#https://flakehub.com/f/DeterminateSystems/nix/=${{ inputs.nix-version }}";#' ./flake.nix
rm flake.nixx
git add flake.nix
git commit -m "Update Nix release to ${{ inputs.nix-version }}"
7 changes: 4 additions & 3 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ concurrency:
group: release

on:
push:
tags:
- "v*.*.*"
release:
types:
- released

permissions:
contents: write # In order to upload artifacts to GitHub releases
Expand All @@ -31,6 +31,7 @@ jobs:
cache-key: release-aarch64-darwin-artifacts-${{ github.sha }}

release:
environment: production
runs-on: ubuntu-latest
needs:
- build-x86_64-linux
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ You can also remove your `$HOME/nix-installer-wsl-tests-temp` folder whenever yo

This package uses [Semantic Versioning](https://semver.org/). When determining the version number for a new release refer to Semantic Versioning for guidance. You can use the `check-semver` command alias from within the development environment to validate your changes don't break semver.

To cut a release, run `./prepare-release.sh 0.0.1` inside `nix develop`.
This script will:
To cut a release, run the GitHub Actions workflow `propose-release.yml`.
This will:

- Create a release branch from `main` (`git checkout -b release-v0.0.1`)
- Release PRs should not contain any installer-related changes which require review
Expand Down
46 changes: 0 additions & 46 deletions prepare-release.sh

This file was deleted.

Loading