diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77aa731..8f2dbbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ name: Release on: push: - branches: - - main - - develop +# branches: +# - main +# - develop workflow_dispatch: jobs: @@ -24,6 +24,11 @@ jobs: run: npm ci - name: Prepare run: npm run build + - name: Set release version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} + run: echo "RELEASE_VERSION=$(npx semantic-release --dryRun | grep -oP 'Published release \K.*? ')" >> $GITHUB_ENV - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -49,3 +54,4 @@ jobs: with: files: sbom.json repo-token: ${{ secrets.GITHUB_TOKEN }} + release-tag: ${{ env.RELEASE_VERSION }}