Skip to content

Commit 5d0517d

Browse files
authored
Merge pull request #12 from newrelic-experimental/OpenSourceBotToken
fix: Added OpenSourceBot Token
2 parents 86592d9 + a11c4ba commit 5d0517d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Build and Release v1.2.1
33
on:
44
workflow_dispatch: # This event allows manual triggering
55

6+
env:
7+
THIRD_PARTY_GIT_AUTHOR_EMAIL: opensource+bot@newrelic.com
8+
THIRD_PARTY_GIT_AUTHOR_NAME: nr-opensource-bot
9+
610
jobs:
711
build-and-release:
812
runs-on: ubuntu-latest
@@ -108,7 +112,7 @@ jobs:
108112
id: create_release
109113
uses: actions/github-script@v6
110114
with:
111-
github-token: ${{ secrets.GITHUB_TOKEN }}
115+
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
112116
script: |
113117
try {
114118
var changelog = ``;
@@ -134,7 +138,7 @@ jobs:
134138
- name: Upload Release Artifacts
135139
uses: actions/upload-release-asset@v1
136140
env:
137-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
GITHUB_TOKEN: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
138142
with:
139143
asset_path: /tmp/to/${{ env.RELEASE_NAME}}${{ steps.set_tag.outputs.tag }}.zip
140144
asset_name: ${{ env.RELEASE_NAME}}${{ steps.set_tag.outputs.tag }}.zip
@@ -145,7 +149,7 @@ jobs:
145149
id: github_changelog
146150
uses: Helmisek/conventional-changelog-generator@v1.0.6-release
147151
with:
148-
repo-token: ${{ secrets.GITHUB_TOKEN }}
152+
repo-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
149153
commit-types: "fix:Bug Fixes,feat:Features,doc:Documentation,sdk:Build Upgrades,BREAKING CHANGE:Enhancements"
150154
template-path: ".github/workflows/CHANGELOG.tpl.md"
151155

@@ -171,8 +175,8 @@ jobs:
171175
172176
# Commit the updated CHANGELOG.md file
173177
git add CHANGELOG.md
174-
git config --local user.email "action@github.com"
175-
git config --local user.name "GitHub Action"
178+
git config user.email "${{ env.THIRD_PARTY_GIT_AUTHOR_EMAIL }}"
179+
git config user.name "${{ env.THIRD_PARTY_GIT_AUTHOR_NAME }}"
176180
git commit -m "Update Changelog for Release [skip ci]"
177181
178182
# Push the changes to the remote repository
@@ -188,7 +192,7 @@ jobs:
188192
id: update_release
189193
uses: actions/github-script@v6
190194
with:
191-
github-token: ${{ secrets.GITHUB_TOKEN }}
195+
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
192196
script: |
193197
try {
194198

0 commit comments

Comments
 (0)