Skip to content

Commit a1e5afe

Browse files
build: ensure the correct token is used for publish-lib
1 parent d2e4049 commit a1e5afe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
with:
7171
# 0 indicates all history, because publish requires tag information
7272
fetch-depth: 0
73+
# do not persist credentials to avoid issues with protected branches (e.g. when pushing version-bump commit after merging PR)
74+
persist-credentials: false
7375
# setup node and dependency cache
7476
- name: Setup Node and NPM Cache
7577
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
@@ -97,6 +99,7 @@ jobs:
9799
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
98100
git config user.email "actions@github.com"
99101
git config user.name "Github Actions"
102+
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/shiftcode/sc-commons-public.git
100103
npm run publish-libs
101104
env:
102105
GITHUB_CONTEXT: ${{ toJson(github) }}

0 commit comments

Comments
 (0)