diff --git a/.github/workflows/create-pr-for-release-and-publish.yml b/.github/workflows/create-pr-for-release-and-publish.yml index 7815fd8e..5858237d 100644 --- a/.github/workflows/create-pr-for-release-and-publish.yml +++ b/.github/workflows/create-pr-for-release-and-publish.yml @@ -83,14 +83,14 @@ jobs: cache: 'yarn' node-version-file: package.json registry-url: https://registry.npmjs.org + always-auth: true + token: ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Install Dependencies run: yarn - name: Publish release to npm run: yarn npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Create GitHub release run: node ./scripts/actions/create-release.mjs diff --git a/.github/workflows/publish-next.yml b/.github/workflows/publish-next.yml index 483a8077..65a790e4 100644 --- a/.github/workflows/publish-next.yml +++ b/.github/workflows/publish-next.yml @@ -33,6 +33,8 @@ jobs: cache: 'yarn' node-version-file: package.json registry-url: https://registry.npmjs.org + always-auth: true + token: ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Install Dependencies run: yarn @@ -45,9 +47,10 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - - name: Publish new @next version + - name: Set new version run: | yarn version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s) + + - name: Publish new @next version + run: | yarn npm publish --tag next - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}