-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how releases are done in the readme
Also create separate release PR and release workflows
- Loading branch information
1 parent
8bbda24
commit 9b8b957
Showing
3 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# https://release-plz.ieni.dev/docs/github/quickstart#example-release-pr-and-release | ||
# We use a separate workflow to release vs create a release PR -- this is because we (currently) only want to | ||
# create a release PR after the `Feature Powerset` workflow completes, but we want to publish any merged release | ||
# commits once they're merged to `main`. | ||
|
||
name: Release | ||
|
||
|
@@ -7,20 +10,14 @@ permissions: | |
contents: write | ||
|
||
on: | ||
workflow_run: | ||
# Releases are performed after the `Feature Powerset` workflow completes successfully. Currently, `Feature Powerset` | ||
# runs once a week, so releases will also be performed once a week. | ||
workflows: [ Feature Powerset ] | ||
types: | ||
- completed | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -30,11 +27,8 @@ jobs: | |
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: MarcoIeni/[email protected] | ||
with: | ||
command: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
on-powerset-failure: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
steps: | ||
- run: echo 'The `Feature Powerset` workflow failed, skipping release.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# https://release-plz.ieni.dev/docs/github/quickstart#example-release-pr-and-release | ||
|
||
name: Release PR | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: | ||
workflow_run: | ||
# Release PRs are created after the `Feature Powerset` workflow completes successfully. Currently, | ||
# `Feature Powerset` runs once a week, so release PRs will also be created once a week. | ||
workflows: [ Feature Powerset ] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
release-pr: | ||
name: Release PR | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: MarcoIeni/[email protected] | ||
with: | ||
command: release-pr | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
on-powerset-failure: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
steps: | ||
- run: echo 'The `Feature Powerset` workflow failed, skipping release.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters