Skip to content

Commit

Permalink
Update npm-publish-github-packages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg authored May 25, 2023
1 parent 7f5e104 commit a25e18d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ jobs:
with:
cache: 'yarn'
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: '@thepolicylab-projectportals'
- name: Setup .yarnrc.yml
run: |
yarn config set npmScopes.thepolicylab-projectportals.npmRegistryServer "https://npm.pkg.github.com"
yarn config set npmScopes.thepolicylab-projectportals.npmAlwaysAuth true
yarn config set npmScopes.thepolicylab-projectportals.npmAuthToken $NPM_AUTH_TOKEN
env:
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: yarn install --immutable
- run: yarn test
- name: Update version numbers
Expand All @@ -38,13 +44,9 @@ jobs:
run: |
yarn workspace "@thepolicylab-projectportals/gatsby-theme-project-portal" npm publish --tag next
yarn workspace "@thepolicylab-projectportals/project-portal-content-netlify" npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release packages
if: ${{ github.event_name == 'release' && github.event.release.prerelease == false }}
run: |
yarn workspace "@thepolicylab-projectportals/gatsby-theme-project-portal" npm publish
yarn workspace "@thepolicylab-projectportals/project-portal-content-netlify" npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a25e18d

Please sign in to comment.