Release #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump: | |
| description: "Version bump type (leave empty to auto-detect from commits)" | |
| required: false | |
| type: choice | |
| options: | |
| - "" | |
| - patch | |
| - minor | |
| - major | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| uses: ./.github/workflows/test.yml | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install git-cliff | |
| uses: taiki-e/install-action@git-cliff | |
| - name: Determine next version | |
| id: version | |
| run: | | |
| BUMP_ARG="${{ inputs.bump && format('--bump {0}', inputs.bump) || '--bump' }}" | |
| VERSION=$(git-cliff --bumped-version $BUMP_ARG) | |
| if [ -z "$VERSION" ]; then | |
| echo "::error::No version bump detected. Are there any conventional commits since the last tag?" | |
| exit 1 | |
| fi | |
| echo "Next version: $VERSION" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Generate changelog | |
| id: changelog | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: --unreleased --strip header --tag ${{ steps.version.outputs.version }} | |
| env: | |
| OUTPUT: CHANGES.md | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: ${{ steps.version.outputs.version }} | |
| body_path: CHANGES.md | |
| make_latest: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true |