From 17c4c037daa499eef1be3e84d88377de57af75a6 Mon Sep 17 00:00:00 2001 From: Leonardo de Jesus Diz Conde Date: Fri, 1 Sep 2023 10:10:47 -0300 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFCU-86a0k18cn=20-=20Neon-Dappkit:=20Set?= =?UTF-8?q?up=20auto-release=20to=20use=20`rush=20publish=20--commit`=20an?= =?UTF-8?q?d=20Github=20Token=20to=20bump=20the=20versions=20and=20commit?= =?UTF-8?q?=20them?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-publish.yml | 38 ++----------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 471673f..2b88560 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -34,42 +34,8 @@ jobs: run: rush update - name: Build Projects run: rush rebuild - - name: Publishing neon-dappkit-types - id: dappkit_type - uses: JS-DevTools/npm-publish@v2 - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/neon-dappkit-types - - name: Publishing neon-dappkit - id: dappkit - uses: JS-DevTools/npm-publish@v2 - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/neon-dappkit - - name: Notify packages releases (Github Actions Annotations) - run: | - # Get the values from workflow outputs - hasPublishedDappkit="${{ steps.dappkit.outputs.type }}" - hasPublishedDappkitType="${{ steps.dappkit_type.outputs.type }}" - - if [[ ! "$hasPublishedDappkitType" && ! "$hasPublishedDappkit" ]]; then - # Both packages failed to publish - echo "::error ::NPM release error: Both packages failed to publish. Please review the package.json version and try again." - exit 1 - elif [[ ! "$hasPublishedDappkitType" ]]; then - # Package DappkitType failed to publish - echo "::error ::No changes have been detected in dappkitType. Please check the package.json version." - echo "::warning ::A new release was made in dappkit. The new version ${{ steps.dappkit.outputs.version }} was released." - elif [[ ! "$hasPublishedDappkit" ]]; then - # Package Dappkit failed to publish - echo "::error ::No changes have been detected in dappkit. Please check the package.json version." - echo "::warning ::A new release was made in dappkit_type. The new version ${{ steps.dappkit_type.outputs.version }} was released." - else - # Both packages were published successfully - echo "::warning ::A new release was made in dappkit_type. The new version ${{ steps.dappkit_type.outputs.version }} was released." - echo "::warning ::A new release was made in dappkit. The new version ${{ steps.dappkit.outputs.version }} was released." - fi - exit 0 + - name: Publish Projects + run: rush publish --apply --target-branch main --publish --npm-auth-token ${{ secrets.NPM_TOKEN }} --add-commit-details --include-all - name: Commit and Push package.json version update run: | git add .