diff --git a/.github/workflows/ci-publish-package.yml b/.github/workflows/ci-publish-package.yml index f7b988e..b41e58b 100644 --- a/.github/workflows/ci-publish-package.yml +++ b/.github/workflows/ci-publish-package.yml @@ -18,8 +18,6 @@ jobs: SEED_PHRASE_6: ${{ secrets.SEED_PHRASE_6 }} SEED_PHRASE_7: ${{ secrets.SEED_PHRASE_7 }} SEED_PHRASE_8: ${{ secrets.SEED_PHRASE_8 }} - outputs: - build-directory: ${{ steps.upload_build.outputs.build_directory }} steps: - name: Checkout code @@ -40,6 +38,10 @@ jobs: - name: Run tests run: npm run test + - name: Extract Package Version + id: extract_version + run: echo "package_version=$(jq -r '.version' package.json)" >> $GITHUB_ENV + - name: Upload build artifacts id: upload_build uses: actions/upload-artifact@v4 @@ -63,7 +65,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18.x' - cache: 'npm' - name: Authenticate to npm registry env: @@ -71,10 +72,11 @@ jobs: run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc - name: Publish to npm + id: publish run: npm publish - name: Send Slack Notification for Publish - if: ${{ !cancelled() }} + if: steps.publish.outcome == 'success' uses: slackapi/slack-github-action@v1.25.0 with: payload: | @@ -84,7 +86,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*zkVerifyJS Package Published*\n\n*Build URL:* " + "text": "*:tada: :zk-logo-icon-square-black: zkVerifyJS Package Published :zk-logo-icon-square-black: :tada:*\n\n*Build URL:* \n\n*Published Package:* " } } ]