-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#525] Define create_release_pr workflow to automate Release PR creating
- Loading branch information
Showing
4 changed files
with
89 additions
and
2 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
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
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,32 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "## ✨ Features", | ||
"labels": [ | ||
"type : feature" | ||
] | ||
}, | ||
{ | ||
"title": "## 🐛 Bug fixes", | ||
"labels": [ | ||
"type : bug" | ||
] | ||
}, | ||
{ | ||
"title": "## 🧹 Chores", | ||
"labels": [ | ||
"type : chore" | ||
] | ||
}, | ||
{ | ||
"title": "## Others", | ||
"exclude_labels": [ | ||
"type : feature", | ||
"type : bug", | ||
"type : chore", | ||
"type : release" | ||
] | ||
} | ||
], | ||
"max_pull_requests": 200 | ||
} |
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,55 @@ | ||
name: Create the Release pull request | ||
|
||
on: | ||
workflow_dispatch: | ||
# testing | ||
push: | ||
branches: | ||
- feature/525-create-release-pr-workflow | ||
|
||
jobs: | ||
bump_version: | ||
name: Bump version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Read the current version | ||
id: version | ||
uses: christian-draeger/[email protected] | ||
with: | ||
path: 'version.properties' | ||
properties: 'templateScriptVersion' | ||
|
||
- name: Find HEAD commit | ||
id: head | ||
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
|
||
- name: Build changelog | ||
id: changelog | ||
uses: mikepenz/release-changelog-builder-action@v4 | ||
with: | ||
configuration: ".github/workflows/changelog-config.json" | ||
# Listing PRs from the last tag to the HEAD commit | ||
toTag: ${{ steps.head.outputs.sha }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create the Release pull request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
assignees: ${{ secrets.GITHUB_USER }} | ||
token: ${{ secrets.WIKI_ACTION_TOKEN }} | ||
committer: Nimble Bot <[email protected]> | ||
branch: release/${{ steps.version.outputs.templateScriptVersion }} | ||
base: main | ||
delete-branch: true | ||
title: 'Release - ${{ steps.version.outputs.templateScriptVersion }}' | ||
labels: | | ||
type : release | ||
body: | | ||
https://github.com/nimblehq/android-templates/milestone/TODO | ||
${{ steps.changelog.outputs.changelog }} |