diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7f74519..0911c8f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,8 @@ on: jobs: build: runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} steps: - uses: actions/checkout@v4 with: @@ -27,6 +29,11 @@ jobs: run: bun run publish:lib env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + - name: Extract version + id: get_version + run: | + VERSION=$(node -p "require('./dist/ngx-mask-lib/package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT slack_notification: needs: @@ -56,6 +63,13 @@ jobs: "text": "Project: `${{ github.event.repository.name }}`" } }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Version: `${{ needs.build.outputs.version || 'TBA' }}`" + } + }, { "type": "section", "text": { @@ -67,7 +81,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "Website URL: ${{ env.NPM_PACKAGE_URL }}" + "text": "Website URL: ${{ secrets.NPM_PACKAGE_URL }}" } } ]