Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from tshion/feature/#6_create_merge_pr
Browse files Browse the repository at this point in the history
#6 アプリバージョン更新時、マージPR を自動生成する機構の追加
  • Loading branch information
tshion authored Feb 24, 2024
2 parents 4ae27f9 + 4f48fe5 commit 37debb2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/create-merge-pr.yml
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 }}

0 comments on commit 37debb2

Please sign in to comment.