-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8b010c
commit a0702ce
Showing
2 changed files
with
93 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: 'Draft New Release' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'The version you want to release.' | ||
required: true | ||
|
||
jobs: | ||
draft-new-release: | ||
name: 'Draft a New Release' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create release branch | ||
run: git checkout -b release/${{ github.event.inputs.version }} | ||
|
||
- name: Update Changelog | ||
uses: thomaseizinger/keep-a-changelog-new-release@1.1.0 | ||
with: | ||
version: ${{ github.event.inputs.version }} | ||
|
||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "Github Actions" | ||
git config user.email "noreply@github.com" | ||
- name: Commit Changelog | ||
id: make-commit | ||
run: | | ||
git add CHANGELOG.md | ||
git commit --message "Prepare release ${{ github.event.inputs.version }}" | ||
echo "::set-output name=commit::$(git rev-parse HEAD)" | ||
- name: Push New Branch | ||
run: git push origin release/${{ github.event.inputs.version }} | ||
|
||
- name: Create Pull Request | ||
uses: thomaseizinger/create-pull-request@1.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
head: release/${{ github.event.inputs.version }} | ||
base: main | ||
title: Release ${{ github.event.inputs.version }} | ||
reviewers: ${{ github.actor }} | ||
body: | | ||
Hi @${{ github.actor }}! | ||
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}. | ||
I've updated the changelog file in this commit: ${{ steps.make-commit.outputs.commit }}. | ||
Merging this PR will create a GitHub release with the new PK3. |
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