From 622a38ad41b8cc1183d77d1dc4f70710525c6a84 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 13 Nov 2023 14:13:56 +0100 Subject: [PATCH] chore: CI --- .github/workflows/publish-nightly.yml | 14 +++++++------- .github/workflows/publish-prerelease.yml | 10 +++++----- .github/workflows/publish-release.yml | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index e87091f..af26fca 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -25,10 +25,10 @@ jobs: if [ -z "${{ secrets.NPM_TOKEN }}" ]; then echo "env NPM_TOKEN not set!" else - echo ::set-output name=is-ok::"1" + echo "publish=nightly" >> $GITHUB_OUTPUT fi - name: Prepare Environment - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | yarn env: @@ -39,7 +39,7 @@ jobs: with: remove-version-tag-prefix: false - name: Bump version to nightly - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.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 +49,18 @@ jobs: env: CI: true - name: Build - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | yarn build env: CI: true - name: Set .npmrc file - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm whoami - name: Git commit - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | git config --global user.email "ci@github.com" git config --global user.name "Github CI" @@ -69,7 +69,7 @@ jobs: env: CI: true - name: Publish nightly to NPM - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.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 67c04ec..07b2a67 100644 --- a/.github/workflows/publish-prerelease.yml +++ b/.github/workflows/publish-prerelease.yml @@ -75,27 +75,27 @@ jobs: if [ -z "${{ secrets.NPM_TOKEN }}" ]; then echo "env NPM_TOKEN not set!" else - echo ::set-output name=is-ok::"1" + echo "publish=prerelease" >> $GITHUB_OUTPUT fi - name: Prepare Environment - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | yarn env: CI: true - name: Build - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | yarn build env: CI: true - name: Set .npmrc file - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm whoami - name: Publish prerelease to NPM - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.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 b7b9c06..144b7d7 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -108,27 +108,27 @@ jobs: if [ -z "${{ secrets.NPM_TOKEN }}" ]; then echo "env NPM_TOKEN not set!" else - echo ::set-output name=is-ok::"1" + echo "publish=release" >> $GITHUB_OUTPUT fi - name: Prepare Environment - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | yarn env: CI: true - name: Build - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | yarn build env: CI: true - name: Set .npmrc file - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm whoami - name: Publish to NPM - if: ${{ steps.check-npm-token.outputs.is-ok }} + if: ${{ steps.do-publish.outputs.publish }} run: yarn lerna:publish from-package --no-verify-access --yes env: CI: true