Deploy #36
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: Deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version-tag: | |
| description: Version tag | |
| required: true | |
| default: 'v0.1.0' | |
| dry-run: # print the changelog without creating a PR. | |
| description: Dry run | |
| type: boolean | |
| default: false | |
| exclude-types: | |
| description: Commit types to exclude from the changelog | |
| required: false | |
| default: build,docs,style,other | |
| jobs: | |
| changelog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get CHANGELOG | |
| id: changelog | |
| uses: kiyoon/changelog-action@v2 | |
| with: | |
| new-version-tag-for-future: ${{ github.event.inputs.version-tag }} | |
| tag-prefix: v | |
| exclude-types: ${{ github.event.inputs.exclude-types }} | |
| write-to-file: true | |
| changelog-file-path: docs/CHANGELOG.md | |
| - name: Display CHANGELOG | |
| env: | |
| CHANGES_BODY: ${{ steps.changelog.outputs.changes }} | |
| run: | | |
| echo "${CHANGES_BODY}" | |
| echo "${CHANGES_BODY}" > "$GITHUB_STEP_SUMMARY" | |
| - name: Create PR | |
| if: ${{ github.event.inputs.dry-run == 'false' }} | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| commit-message: 'chore: release ${{ github.event.inputs.version-tag }}' | |
| title: 'chore: release ${{ github.event.inputs.version-tag }}' | |
| body: | | |
| :robot: The changelog was automatically generated by [kiyoon/changelog-action](https://github.com/kiyoon/changelog-action). :robot: | |
| branch: chore/release-${{ github.event.inputs.version-tag }} | |
| labels: | | |
| release |