Skip to content

Commit

Permalink
Merge pull request #562 from nimblehq/feature/525-reuse-release-pr-wo…
Browse files Browse the repository at this point in the history
…rkflow

[#525] Reuse the "nimblehq/github-actions-workflows/create_release_pr" workflow to automate Release PR creating
  • Loading branch information
ryan-conway authored Jun 26, 2024
2 parents 1cc164b + a8639ab commit ecbd6e1
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .cicdtemplate/.github/workflows/config/changelog-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
],
"empty_content": "N/A"
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
],
"empty_content": "N/A"
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
],
"empty_content": "N/A"
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
25 changes: 25 additions & 0 deletions .cicdtemplate/.github/workflows/create_release_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create the Release pull request

on:
workflow_dispatch:

jobs:
create_release_pull_request:
name: Create the Release pull request
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check out the latest code
uses: actions/checkout@v4

- name: Read the current version
id: version
run: echo "version=$(perl -nle 'print $1 if /ANDROID_VERSION_NAME = \"(.*)\"$/' buildSrc/src/main/java/Versions.kt)" >> $GITHUB_OUTPUT

- uses: nimblehq/github-actions-workflows/[email protected]
with:
release_version: ${{ steps.version.outputs.version }}
changelog_configuration: ".github/workflows/config/changelog-release.json"
assignee: bot-nimble
35 changes: 35 additions & 0 deletions .github/workflows/config/changelog-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
],
"empty_content": "N/A"
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
],
"empty_content": "N/A"
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
],
"empty_content": "N/A"
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
28 changes: 28 additions & 0 deletions .github/workflows/create_release_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create the Release pull request

on:
workflow_dispatch:

jobs:
create_release_pull_request:
name: Create the Release pull request
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check out the latest code
uses: actions/checkout@v4

- name: Read the current version
id: version
uses: christian-draeger/[email protected]
with:
path: "version.properties"
properties: "templateScriptVersion"

- uses: nimblehq/github-actions-workflows/[email protected]
with:
release_version: ${{ steps.version.outputs.templateScriptVersion }}
changelog_configuration: ".github/workflows/config/changelog-release.json"
assignee: bot-nimble

0 comments on commit ecbd6e1

Please sign in to comment.