|
14 | 14 | default: 'Push for new revision'
|
15 | 15 | required: false
|
16 | 16 | type: string
|
17 |
| - release_type: |
18 |
| - description: 'Release type: Major/Minor/Patch' |
| 17 | + revision_type: |
| 18 | + description: 'Revision type: Major/Minor/Patch' |
19 | 19 | type: choice
|
20 | 20 | required: true
|
21 | 21 | default: 'patch'
|
22 | 22 | options:
|
23 | 23 | - 'patch'
|
24 | 24 | - 'minor'
|
25 | 25 | - 'major'
|
| 26 | + create_release: |
| 27 | + description: 'Create a new GitHub release?' |
| 28 | + type: boolean |
| 29 | + required: false |
| 30 | + default: false |
26 | 31 |
|
27 | 32 | permissions:
|
28 | 33 | contents: write
|
@@ -51,11 +56,11 @@ jobs:
|
51 | 56 | with:
|
52 | 57 | python-version: ${{ vars.PYTHON_VERSION }}
|
53 | 58 | - name: Install Python tools
|
54 |
| - run: gradle installBuildTools ${gradle_debug_params} |
| 59 | + run: gradle installBuildTools ${{ gradle_debug_params }} |
55 | 60 | - name: Publish
|
56 | 61 | id: publish-it
|
57 | 62 | run: |
|
58 |
| - bumpver update "--${{ inputs.release_type }}" |
| 63 | + bumpver update "--${{ inputs.revision_type }}" |
59 | 64 | version="$(awk '/./{line=$0} END{print line}' .version)"
|
60 | 65 | echo "version=$( echo "$version" )" >> $GITHUB_OUTPUT
|
61 | 66 | git config --global user.name "$(git log -n 1 --pretty=format:%an)"
|
|
65 | 70 | git pull --rebase -Xtheirs && git push --atomic origin HEAD
|
66 | 71 |
|
67 | 72 | create-release:
|
68 |
| - needs: publish |
69 |
| - name: Create Release |
70 | 73 | runs-on: ubuntu-latest
|
71 | 74 | steps:
|
72 |
| - - name: Checkout Repository |
73 |
| - uses: actions/checkout@v3 |
74 |
| - - name: Git Tag Version |
75 |
| - uses: yorevs/hspylib/.github/actions/tag-version@master |
76 |
| - with: |
77 |
| - tag-name: "v${{ needs.publish.outputs.version }}" |
78 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
79 |
| - - name: Create Changelog |
80 |
| - id: change-log |
81 |
| - uses: yorevs/hspylib/.github/actions/changelog@master |
| 75 | + - uses: ./.github/workflows/create-release.yml |
82 | 76 | with:
|
83 |
| - tag-name: "v${{ needs.publish.outputs.version }}" |
84 |
| - - name: Create Release |
85 |
| - uses: actions/create-release@v1 |
86 |
| - env: |
87 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
88 |
| - with: |
89 |
| - tag_name: "v${{ needs.publish.outputs.version }}" |
90 |
| - release_name: "${{ vars.APP_NAME }}-v${{ needs.publish.outputs.version }}-r${{ github.run_number }}" |
91 |
| - body: | |
92 |
| - ${{ steps.change-log.outputs.changelog }} |
93 |
| - draft: false |
94 |
| - prerelease: false |
| 77 | + comment: ${{ inputs.comment }} |
| 78 | + |
0 commit comments