diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4a7150b..7e6f2be 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: fetch-depth: 0 - name: "Setup pnpm" - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 - name: "Setup node" uses: actions/setup-node@v4 @@ -45,9 +45,23 @@ jobs: node-version-file: package.json cache: "pnpm" + - name: "Install dependencies" + run: pnpm install + - name: "Release Package 📦" run: pnpm dlx @jcwillox/semantic-release-config env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SEMANTIC_RELEASE_GITHUB_DRAFT: ${{ inputs.draft }} SEMANTIC_RELEASE_FORCE_RELEASE: ${{ inputs.release_type }} + SEMANTIC_RELEASE_CMD_PREPARE: "pnpm run build" + SEMANTIC_RELEASE_GIT_ASSETS: "dist/index.js" + SEMANTIC_RELEASE_GIT_MESSAGE: "release: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + + - name: "Update major version tag" + run: | + VERSION=$(jq -r ".version" package.json | cut -d "." -f 1) + git tag -f "v$VERSION" + git push origin "v$VERSION" --tags --force + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}