Last active
March 31, 2024 10:11
-
-
Save mnaruse/e72ed572e801121c373b379f59e176aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
name: Create a release pull request | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#defining-access-for-the-github_token-scopes | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
create-release-pr: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # git-pr-release needs the git histories | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.3 # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
# https://github.com/x-motemen/git-pr-release | |
- name: Create a release pull request | |
env: | |
GIT_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_PR_RELEASE_BRANCH_PRODUCTION: main | |
GIT_PR_RELEASE_BRANCH_STAGING: develop | |
GIT_PR_RELEASE_LABELS: release | |
TZ: Asia/Tokyo | |
run: | | |
gem install -N git-pr-release -v "2.2.0" | |
git-pr-release --no-fetch | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment