Skip to content

Commit

Permalink
ci: Build - Tune NPM Authorization
Browse files Browse the repository at this point in the history
Seems the environment way is not going to work. Fall back to already
working temporary `.npmrc` pattern.
  • Loading branch information
mmichaelis committed Dec 7, 2023
1 parent ddeeb82 commit 9935add
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
npmHost: ${{ needs.env.outputs.npm-host }}
npmUrl: ${{ needs.env.outputs.npm-url }}
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: authorize
name: "NPM Authorization"
run: |
Expand All @@ -41,11 +44,10 @@ jobs:
npmUrl="${{ env.npmUrl }}"
npmAuthToken="${{ env.NODE_AUTH_TOKEN }}"
echo "npm_config_//${npmHost}/:_authToken=${npmAuthToken}" >> $GITHUB_ENV
echo "npm_config_@coremedia:registry=${npmUrl}" >> $GITHUB_ENV
- id: checkout
name: Checkout
uses: actions/checkout@v4
echo "//${npmHost}/:_authToken=${npmAuthToken}" >> .npmrc
echo "@coremedia:registry=${npmUrl}" >> .npmrc
# We must not commit this change.
git update-index --assume-unchanged .npmrc
- id: installPnpm
name: "Install: Use PNPM ${{ env.pnpmVersion }}"
uses: pnpm/action-setup@v2
Expand Down

0 comments on commit 9935add

Please sign in to comment.