Skip to content

Commit 3bdaab8

Browse files
authored
feat: Update release.yml for openSourceBot
1 parent 6d4ac4b commit 3bdaab8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Build and Release (Manual Run) v1.3
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
69
jobs:
710
build-and-release:
811
runs-on: ubuntu-latest
@@ -109,7 +112,7 @@ jobs:
109112
id: create_release
110113
uses: actions/github-script@v6
111114
with:
112-
github-token: ${{ secrets.GITHUB_TOKEN }}
115+
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
113116
script: |
114117
try {
115118
var changelog = ``;
@@ -135,7 +138,7 @@ jobs:
135138
- name: Upload Release Artifacts
136139
uses: actions/upload-release-asset@v1
137140
env:
138-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
GITHUB_TOKEN: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
139142
with:
140143
asset_path: /tmp/to/${{ env.RELEASE_NAME}}${{ steps.set_tag.outputs.tag }}.zip
141144
asset_name: ${{ env.RELEASE_NAME}}${{ steps.set_tag.outputs.tag }}.zip
@@ -146,7 +149,7 @@ jobs:
146149
id: github_changelog
147150
uses: Helmisek/conventional-changelog-generator@v1.0.6-release
148151
with:
149-
repo-token: ${{ secrets.GITHUB_TOKEN }}
152+
repo-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
150153
commit-types: "fix:Bug Fixes,feat:Features,doc:Documentation,build:Build Upgrades,BREAKING CHANGE:Enhancements"
151154
template-path: ".github/workflows/CHANGELOG.tpl.md"
152155

@@ -172,8 +175,8 @@ jobs:
172175
173176
# Commit the updated CHANGELOG.md file
174177
git add CHANGELOG.md
175-
git config --local user.email "action@github.com"
176-
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 }}"
177180
git commit -m "Update Changelog for Release [skip ci]"
178181
179182
# Push the changes to the remote repository
@@ -189,7 +192,7 @@ jobs:
189192
id: update_release
190193
uses: actions/github-script@v6
191194
with:
192-
github-token: ${{ secrets.GITHUB_TOKEN }}
195+
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
193196
script: |
194197
try {
195198

0 commit comments

Comments
 (0)