エラーが出ている状態
.github/workflows/git-pr-release.yml
name: git-pr-release
on:
push:
branches:
- develop
jobs:
git-pr-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # git-pr-release needs the git histories
- uses: actions/setup-ruby@v1
with:
ruby-version: 3.1
- run: gem install --no-document git-pr-release -v "2.2.0"
- run: git-pr-release --no-fetch
env:
TZ: Asia/Tokyo
GIT_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_PR_RELEASE_BRANCH_PRODUCTION: main # 本番ブランチをを指定
GIT_PR_RELEASE_BRANCH_STAGING: develop # ステージングのブランチを指定
GIT_PR_RELEASE_TEMPLATE: .github/.git-pr-release
対応
以下を追加した
permissions:
id-token: write
contents: read
pull-requests: write
動くやつ
.github/workflows/git-pr-release.yml
name: git-pr-release
on:
push:
branches:
- develop
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
git-pr-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # git-pr-release needs the git histories
- uses: actions/setup-ruby@v1
with:
ruby-version: 3.1
- run: gem install --no-document git-pr-release -v "2.2.0"
- run: git-pr-release --no-fetch
env:
TZ: Asia/Tokyo
GIT_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_PR_RELEASE_BRANCH_PRODUCTION: main # 本番ブランチをを指定
GIT_PR_RELEASE_BRANCH_STAGING: develop # ステージングのブランチを指定
GIT_PR_RELEASE_TEMPLATE: .github/.git-pr-release
これで動くことは動く