Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/promote-develop-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ on:
description: 'Integration branch to promote'
required: true
default: develop
type: string
type: choice
options:
- develop
base_branch:
description: 'Release branch that receives the promotion PR'
required: true
default: main
type: string
type: choice
options:
- main
enable_auto_merge:
description: 'Enable auto-merge for the promotion PR after checks pass'
required: true
Expand All @@ -52,7 +56,7 @@ jobs:
name: Open promotion PR
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.RELEASE_AUTOMATION_TOKEN || github.token }}
GH_TOKEN: ${{ github.token }}
BASE_BRANCH: ${{ inputs.base_branch }}
HEAD_BRANCH: ${{ inputs.head_branch }}
steps:
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,22 @@ jobs:
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
steps:
- name: Verify release automation token
env:
RELEASE_AUTOMATION_TOKEN: ${{ secrets.RELEASE_AUTOMATION_TOKEN }}
run: |
if [[ -z "${RELEASE_AUTOMATION_TOKEN}" ]]; then
echo "RELEASE_AUTOMATION_TOKEN is required for release automation." >&2
echo "Use a repository-scoped GitHub App token or fine-grained PAT." >&2
echo "The token must create release tags that trigger downstream workflows." >&2
exit 1
fi

- name: Run release-please
id: release
uses: googleapis/release-please-action@v4
uses: googleapis/release-please-action@8b8fd2cc23b2e18957157a9d923d75aa0c6f6ad5 # v4
with:
token: ${{ secrets.RELEASE_AUTOMATION_TOKEN || github.token }}
token: ${{ secrets.RELEASE_AUTOMATION_TOKEN }}
target-branch: main
release-type: simple

Expand All @@ -59,7 +70,6 @@ jobs:
echo "- Tag: \`${{ steps.release.outputs.tag_name || 'not created' }}\`"
echo "- Version: \`${{ steps.release.outputs.version || 'not created' }}\`"
echo
echo "Use a repository secret named \`RELEASE_AUTOMATION_TOKEN\` from a"
echo "GitHub App or fine-grained PAT if tag or release events must"
echo "trigger downstream workflows."
echo "\`RELEASE_AUTOMATION_TOKEN\` is required so release-created tags"
echo "can trigger downstream Docker image and bundle workflows."
} >> "${GITHUB_STEP_SUMMARY}"
Loading