docs: update CHANGELOG.md for 0.3.3 (#54) #29
Workflow file for this run
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: Create draft release | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| inputs: | |
| release_version: | |
| description: "Release tag (e.g. 1.0.0)" | |
| required: true | |
| default: "1.0.0" | |
| permissions: | |
| contents: write | |
| jobs: | |
| draft-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Find previous stable tag | |
| id: prev_tag | |
| run: | | |
| CURRENT_TAG="${{ github.ref_name }}" | |
| # List all tags matching X.Y.Z (no suffix), sorted by version descending | |
| # Exclude the current tag, then take the first match as the previous stable tag | |
| PREV_TAG=$(git tag -l --sort=-v:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | grep -v "^${CURRENT_TAG}$" | head -n 1) | |
| echo "prev_tag=${PREV_TAG}" >> "$GITHUB_OUTPUT" | |
| echo "Current tag: ${CURRENT_TAG}, Previous stable tag: ${PREV_TAG}" | |
| - name: Generate changelog | |
| id: changelog | |
| uses: requarks/changelog-action@v1 | |
| with: | |
| token: ${{ github.token }} | |
| fromTag: ${{ github.ref_name }} | |
| toTag: ${{ steps.prev_tag.outputs.prev_tag }} | |
| writeToFile: false | |
| - name: Create Draft Release | |
| uses: ncipollo/[email protected] | |
| with: | |
| allowUpdates: true | |
| draft: true | |
| makeLatest: false | |
| name: ${{ github.ref_name }} | |
| body: ${{ steps.changelog.outputs.changes }} | |
| token: ${{ github.token }} |