diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index f472ddbb6..0c0c32d66 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -5,7 +5,7 @@ name: Node.js Package on: release: - types: [created] + types: [ published ] jobs: build-test-publish: @@ -29,7 +29,17 @@ jobs: run: | yarn workspace "@thepolicylab-projectportals/gatsby-theme-project-portal" version "${{ github.ref_name }}" yarn workspace "@thepolicylab-projectportals/project-portal-content-netlify" version "${{ github.ref_name }}" - - name: Publish packages + + - name: Pre-release packages + if: ${{ github.event.release.isLatest }} + 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: + YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Release packages + if: ${{ github.event.release.isLatest }} run: | yarn workspace "@thepolicylab-projectportals/gatsby-theme-project-portal" npm publish yarn workspace "@thepolicylab-projectportals/project-portal-content-netlify" npm publish