Skip to content

chore: uses bot token for release workflow #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
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
21 changes: 17 additions & 4 deletions .github/workflows/prod_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,35 @@ jobs:
prod_release:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Generate bot token
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}

- uses: actions/checkout@v4
with:
# Fetch entire repository history so we can determine version number from it
fetch-depth: 0
token: ${{ steps.app_token.outputs.token }}

- name: Set Git user as GitHub actions
run: git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]"

- name: Merge main -> release
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
with:
type: now
from_branch: main
target_branch: release
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app_token.outputs.token }}

- name: Merge release -> main
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
with:
type: now
from_branch: release
target_branch: main
message: Merge release back to main to get version increment [no ci]
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app_token.outputs.token }}
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,21 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Generate bot token
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.BOT_ID }}
private-key: ${{ secrets.BOT_SK }}

- uses: actions/checkout@v4
with:
# Fetch entire repository history so we can determine version number from it
fetch-depth: 0
token: ${{ steps.app_token.outputs.token }}

- name: Set Git user as GitHub actions
run: git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]"

# semantic-release needs node 20
- name: Use Node.js 20.x
Expand All @@ -89,5 +100,5 @@ jobs:
- name: 'Semantic release'
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}