diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fc2194..1e87ed8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,13 +41,16 @@ jobs: file_pattern: 'README.md' # release - - name: Setup git user + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + name: Setup git user run: | git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)" git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)" - - name: remove git auth + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + name: remove git auth run: git config --unset http.https://github.com/.extraheader - - name: Authenticate with Registry + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + name: Authenticate with Registry run: | echo "registry=http://registry.npmjs.org/" >> .npmrc echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc