This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from tshion/feature/#6_create_merge_pr
#6 アプリバージョン更新時、マージPR を自動生成する機構の追加
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 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,37 @@ | ||
name: Create merge pull request | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches-ignore: | ||
- 'released' | ||
paths: | ||
- 'Build.xcconfig' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-merge-pr: | ||
if: >- | ||
github.event_name == 'workflow_dispatch' || | ||
(github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'アプリバージョン更新')) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
# https://github.com/actions/checkout | ||
- uses: actions/checkout@v4 | ||
|
||
# https://github.com/ruby/setup-ruby | ||
- uses: ruby/setup-ruby@v1 | ||
|
||
- name: Pick version name | ||
id: app-version | ||
run: | | ||
echo "$(ruby scripts/pick-version-name.rb)" > TMP_LOG | ||
echo "message=Merge $(cat TMP_LOG)" >> "$GITHUB_OUTPUT" | ||
- name: Create pull request | ||
run: gh pr create --base released --title "${{ steps.app-version.outputs.message }}" --body "" | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |