From 860db37264c58b7c9af23617e7fbfa0748979b35 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Fri, 28 Feb 2025 09:34:58 -0800 Subject: [PATCH] fix(ci): authenticate with token --- .github/workflows/actions/publish-npm/action.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/actions/publish-npm/action.yml b/.github/workflows/actions/publish-npm/action.yml index 97c155d..75ca7cc 100644 --- a/.github/workflows/actions/publish-npm/action.yml +++ b/.github/workflows/actions/publish-npm/action.yml @@ -39,13 +39,6 @@ runs: run: rm stencil-sass-build.zip shell: bash - - name: Configure Git - if: inputs.tag == 'latest' - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - shell: bash - - name: Bump Version if: inputs.tag == 'dev' run: npm version --no-git-tag-version ${{ inputs.version }} @@ -71,7 +64,11 @@ runs: - name: Push Version if: inputs.tag == 'latest' - run: git push origin main + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + git push origin main shell: bash env: GITHUB_TOKEN: ${{ inputs.github-token }}