Skip to content

Commit

Permalink
ci: fix .npmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jun 17, 2022
1 parent 4a812c4 commit 2d38231
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ jobs:

- name: Run tests
timeout-minutes: 2
run: yarn test
env:
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
run: |
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
yarn test
test_pr:
if: ${{ needs.init.outputs.skip == 'false' && github.event_name == 'pull_request' }}
Expand All @@ -59,7 +63,11 @@ jobs:

- name: Run tests
timeout-minutes: 2
run: yarn test
env:
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
run: |
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
yarn test
release:
name: Release
Expand Down Expand Up @@ -87,9 +95,21 @@ jobs:
- name: Install deps
run: yarn install

- name: Create .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
- name: Run tests
timeout-minutes: 2
run: yarn test
run: |
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
yarn test
- name: Docs
run: yarn docs
Expand All @@ -102,18 +122,6 @@ jobs:
# coverageLocations: |
# ${{github.workspace}}/coverage/*.lcov:lcov

- name: Create .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc
echo "//localhost:4873/:_authToken=${VERDACCIO_TOKEN}" >> .npmrc
echo "email=test@example.com" >> .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}

- name: Release
env:
VERBOSE: ${{ secrets.VERBOSE }}
Expand Down

0 comments on commit 2d38231

Please sign in to comment.