Generate release Pull Request #59
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 | |
jobs: | |
generate-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Batch changes | |
uses: miniscruff/[email protected] | |
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/[email protected] | |
with: | |
version: ${{ github.event.inputs.changie-version }} | |
args: merge | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get the latest version | |
id: latest | |
uses: miniscruff/[email protected] | |
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@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@v2 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Create Pull Request | |
uses: peter-evans/[email protected] | |
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 |