|
1 | | -name: Commit CHANGELOG.md, create a Release and deploy MkDocs |
| 1 | +name: Deploy |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
5 | 5 | inputs: |
6 | 6 | version-tag: |
7 | 7 | description: Version tag |
8 | 8 | required: true |
9 | | - default: v0.1.0 |
10 | | - dry-run: |
| 9 | + default: 'v0.1.0' |
| 10 | + dry-run: # print the changelog without creating a PR. |
11 | 11 | description: Dry run |
12 | 12 | type: boolean |
13 | 13 | default: false |
|
17 | 17 | default: build,docs,style,other |
18 | 18 |
|
19 | 19 | jobs: |
20 | | - commit-changelog-and-release: |
21 | | - uses: deargen/workflows/.github/workflows/commit-changelog-and-release.yml@master |
22 | | - with: |
23 | | - version-tag: ${{ github.event.inputs.version-tag }} |
24 | | - dry-run: ${{ github.event.inputs.dry-run == 'true' }} |
25 | | - changelog-path: docs/CHANGELOG.md |
26 | | - exclude-types: ${{ github.event.inputs.exclude-types }} |
| 20 | + changelog: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - name: Checkout code |
| 24 | + uses: actions/checkout@v4 |
27 | 25 |
|
28 | | - deploy-mkdocs: |
29 | | - if: ${{ github.event.inputs.dry-run == 'false' }} |
30 | | - needs: commit-changelog-and-release |
31 | | - uses: deargen/workflows/.github/workflows/deploy-mkdocs.yml@master |
32 | | - with: |
33 | | - requirements-file: deps/lock/x86_64-manylinux_2_28/requirements_docs.txt |
34 | | - gitlab-project: ${{ vars.GITLAB_PROJECT }} |
35 | | - gitlab-branch: master |
36 | | - version-tag: ${{ github.event.inputs.version-tag }} |
37 | | - deploy-type: tag |
38 | | - secrets: |
39 | | - GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} |
| 26 | + - name: Get CHANGELOG |
| 27 | + id: changelog |
| 28 | + uses: kiyoon/changelog-action@v2 |
| 29 | + with: |
| 30 | + new-version-tag-for-future: ${{ github.event.inputs.version-tag }} |
| 31 | + tag-prefix: v |
| 32 | + exclude-types: ${{ github.event.inputs.exclude-types }} |
| 33 | + write-to-file: true |
| 34 | + changelog-file-path: docs/CHANGELOG.md |
| 35 | + |
| 36 | + - name: Display CHANGELOG |
| 37 | + env: |
| 38 | + CHANGES_BODY: ${{ steps.changelog.outputs.changes }} |
| 39 | + run: | |
| 40 | + echo "${CHANGES_BODY}" |
| 41 | + echo "${CHANGES_BODY}" > "$GITHUB_STEP_SUMMARY" |
| 42 | +
|
| 43 | + - name: Create PR |
| 44 | + if: ${{ github.event.inputs.dry-run == 'false' }} |
| 45 | + uses: peter-evans/create-pull-request@v7 |
| 46 | + with: |
| 47 | + commit-message: 'chore: release ${{ github.event.inputs.version-tag }}' |
| 48 | + title: 'chore: release ${{ github.event.inputs.version-tag }}' |
| 49 | + body: | |
| 50 | + :robot: The changelog was automatically generated by [kiyoon/changelog-action](https://github.com/kiyoon/changelog-action). :robot: |
| 51 | + branch: chore/release-${{ github.event.inputs.version-tag }} |
| 52 | + labels: | |
| 53 | + release |
0 commit comments