-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tech: add release token to prerelease pipeline
- Loading branch information
1 parent
e8a0a77
commit 0a7e3bd
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
token: ${{ secrets.RELEASE_TOKEN }} | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
|
@@ -38,7 +38,7 @@ jobs: | |
|
||
- name: Configure Git | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
run: | | ||
git config --global advice.detachedHead false | ||
git config --global url."https://${TOKEN}:[email protected]/".insteadOf "https://github.com/" | ||
|
@@ -64,6 +64,7 @@ jobs: | |
if: steps.changes.outputs.HAS_CHANGES == 'true' | ||
env: | ||
IS_MINOR: ${{ contains(inputs.release-as-minor, 'true') }} | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
run: | | ||
CURRENT_VERSION_PARTS=(${CURRENT_VERSION//./ }) | ||
MAJOR=${CURRENT_VERSION_PARTS[0]} | ||
|
@@ -87,6 +88,8 @@ jobs: | |
- name: Release New Version | ||
if: ${{ success() && github.ref_name == 'master' && steps.changes.outputs.HAS_CHANGES == 'true' && !inputs.skip-release }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
run: | | ||
git tag -a ${NEW_VERSION} -m "New version ${NEW_VERSION}" | ||
echo "Pushing new tag to remote, which will trigger the Release workflow" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters