Skip to content

Commit 76849db

Browse files
committed
ci(release): support bypass rules when creating tag releases
1 parent a281f4e commit 76849db

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/release-step-3.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ jobs:
208208
- publish-aws-lambda
209209
runs-on: ubuntu-latest
210210
if: ${{ ! inputs.dry_run }}
211-
permissions:
212-
contents: write
213211
steps:
214212
- uses: actions/checkout@v5
215213
with:
@@ -223,9 +221,21 @@ jobs:
223221
echo "Release notes not published yet. Sleeping 30 seconds, retrying afterwards"
224222
sleep 30s
225223
done
224+
225+
- name: Get token
226+
id: get_token
227+
uses: actions/create-github-app-token@v2
228+
with:
229+
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
230+
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
231+
owner: ${{ github.repository_owner }}
232+
repositories: |
233+
apm-agent-java
234+
permission-contents: write
235+
226236
- name: Create GitHub Release
227237
env:
228-
GH_TOKEN: ${{ github.token }}
238+
GH_TOKEN: ${{ steps.get_token.outputs.token }}
229239
run: |
230240
gh release create ${{ env.RELEASE_VERSION_TAG }} \
231241
--title="Release ${{ env.RELEASE_VERSION }}" \

0 commit comments

Comments
 (0)