diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml
index d2e3c2f2..0a66f2c1 100644
--- a/.github/workflows/prepare-release.yml
+++ b/.github/workflows/prepare-release.yml
@@ -25,17 +25,34 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
+ - name: Create GitHub App Token
+ id: app-token
+ uses: actions/create-github-app-token@v1
+ with:
+ app-id: ${{ vars.CI_APP_ID }}
+ private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
+
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
+ token: ${{steps.app-token.outputs.token}}
+
+ - name: Get GitHub App User ID
+ id: get-user-id
+ run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
+ env:
+ GH_TOKEN: ${{ steps.app-token.outputs.token }}
+
+ - name: Configure Git author
+ run: |
+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
- name: Before release
run: |
java -version
mvn --version
- git config --global user.name "SmallRye CI"
- git config --global user.email "smallrye@googlegroups.com"
sed -i -e 's|.*|${{steps.metadata.outputs.current-version}}|' benchmarks/pom.xml
sed -i -e 's|^version: main|version: ${{steps.metadata.outputs.current-version}}|' doc/antora.yml
git add -A .
@@ -66,15 +83,32 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
+ - name: Create GitHub App Token
+ id: app-token
+ uses: actions/create-github-app-token@v1
+ with:
+ app-id: ${{ vars.CI_APP_ID }}
+ private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
+
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
+ token: ${{steps.app-token.outputs.token}}
+
+ - name: Get GitHub App User ID
+ id: get-user-id
+ run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
+ env:
+ GH_TOKEN: ${{ steps.app-token.outputs.token }}
+
+ - name: Configure Git author
+ run: |
+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
- name: After release
run: |
- git config --global user.name "SmallRye CI"
- git config --global user.email "smallrye@googlegroups.com"
sed -i -e 's|.*|${project.version}|' benchmarks/pom.xml
sed -i -e 's|^version: ${{steps.metadata.outputs.current-version}}|version: main|' doc/antora.yml
git add -A .