diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index af26fca..1735740 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -25,10 +25,11 @@ jobs: if [ -z "${{ secrets.NPM_TOKEN }}" ]; then echo "env NPM_TOKEN not set!" else + echo "Publish Release" echo "publish=nightly" >> $GITHUB_OUTPUT fi - name: Prepare Environment - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | yarn env: @@ -39,7 +40,7 @@ jobs: with: remove-version-tag-prefix: false - name: Bump version to nightly - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | COMMIT_TIMESTAMP=$(git log -1 --pretty=format:%ct HEAD) COMMIT_DATE=$(date -d @$COMMIT_TIMESTAMP +%Y%m%d-%H%M%S) @@ -49,18 +50,18 @@ jobs: env: CI: true - name: Build - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | yarn build env: CI: true - name: Set .npmrc file - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm whoami - name: Git commit - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | git config --global user.email "ci@github.com" git config --global user.name "Github CI" @@ -69,7 +70,7 @@ jobs: env: CI: true - name: Publish nightly to NPM - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: yarn lerna:publish from-package --dist-tag nightly --no-verify-access --yes env: CI: true diff --git a/.github/workflows/publish-prerelease.yml b/.github/workflows/publish-prerelease.yml index 07b2a67..153687e 100644 --- a/.github/workflows/publish-prerelease.yml +++ b/.github/workflows/publish-prerelease.yml @@ -75,27 +75,28 @@ jobs: if [ -z "${{ secrets.NPM_TOKEN }}" ]; then echo "env NPM_TOKEN not set!" else + echo "Publish Release" echo "publish=prerelease" >> $GITHUB_OUTPUT fi - name: Prepare Environment - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | yarn env: CI: true - name: Build - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | yarn build env: CI: true - name: Set .npmrc file - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm whoami - name: Publish prerelease to NPM - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: yarn lerna:publish from-package --dist-tag prerelease --no-verify-access --yes env: CI: true diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 144b7d7..f6abb3d 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -108,27 +108,28 @@ jobs: if [ -z "${{ secrets.NPM_TOKEN }}" ]; then echo "env NPM_TOKEN not set!" else + echo "Publish Release" echo "publish=release" >> $GITHUB_OUTPUT fi - name: Prepare Environment - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | yarn env: CI: true - name: Build - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | yarn build env: CI: true - name: Set .npmrc file - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm whoami - name: Publish to NPM - if: ${{ steps.do-publish.outputs.publish }} + if: ${{ steps.check-npm-token.outputs.publish }} run: yarn lerna:publish from-package --no-verify-access --yes env: CI: true