Generate release Pull Request #61
Workflow file for this run
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
name: Generate release Pull Request | |
on: | |
workflow_dispatch: | |
inputs: | |
next-version: | |
description: 'Next version use vX.Y.Z, patch, minor or major' | |
default: 'auto' | |
required: true | |
changie-version: | |
description: Version of Changie to use | |
default: latest | |
required: false | |
prerelease: | |
description: Prerelease values to append to version | |
required: false | |
metadata: | |
description: Metadata values to append to version | |
required: false | |
permissions: read-all | |
jobs: | |
generate-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Batch changes | |
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0 | |
with: | |
version: ${{ github.event.inputs.changie-version }} | |
args: "\ | |
batch | |
${{ github.event.inputs.next-version }} | |
${{ github.event.inputs.prerelease && format('-p {0}', github.event.inputs.prerelease) }} | |
${{ github.event.inputs.metadata && format('-m {0}', github.event.inputs.metadata) }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Merge changes | |
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0 | |
with: | |
version: ${{ github.event.inputs.changie-version }} | |
args: merge | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get the latest version | |
id: latest | |
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0 | |
with: | |
version: ${{ github.event.inputs.changie-version }} | |
args: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Draft Release | |
id: draft-release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 | |
with: | |
draft: true | |
body_path: ".changes/${{ steps.latest.outputs.output }}.md" | |
tag_name: ${{ steps.latest.outputs.output }} | |
prerelease: "${{ github.event.inputs.prerelease != '' }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
title: "chore: Release ${{ steps.latest.outputs.output }}" | |
branch: release/${{ steps.latest.outputs.output }} | |
commit-message: "chore: Release ${{ steps.latest.outputs.output }}" | |
body: | | |
Prepare release for `${{ steps.latest.outputs.output }}`. | |
Checklist: | |
- [ ] Check that the right version is set in all the files. | |
- [ ] Groom the changelog for wording or missing entries. | |
- [ ] Check that the integration tests table is up to date. | |
[Release Draft](${{ steps.draft-release.outputs.url }}) | |
reviewers: | | |
edgarrmondragon | |
assignees: | | |
edgarrmondragon | |
delete-branch: true | |
labels: Release |