Skip to content

Commit

Permalink
add github app token to semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
yambottle authored Sep 23, 2024
1 parent b3745de commit 2d7b348
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
name: semantic-release
on:
workflow_call:
inputs:
APP_ID:
description: 'Github App ID'
required: true
type: string
GET_TOKEN_KEY:
description: 'Private key to get Github App token'
required: true
type: string

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ inputs.APP_ID }}
private_key: ${{ inputs.GET_TOKEN_KEY }}
- name: Checkout code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -90,5 +102,5 @@ jobs:
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
root_options: "-c .semantic-release.toml -v"
github_token: ${{ steps.generate_token.outputs.token }}
root_options: "-c .semantic-release.toml -v"

0 comments on commit 2d7b348

Please sign in to comment.