|
1 | 1 | name: release |
2 | | -on: workflow_dispatch |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + gradle_publish: |
| 6 | + description: Publish to gradle |
| 7 | + type: boolean |
| 8 | + default: true |
| 9 | + github_release: |
| 10 | + description: Create a GitHub release |
| 11 | + type: boolean |
| 12 | + default: true |
| 13 | + version_increment: |
| 14 | + description: Increment version |
| 15 | + type: boolean |
| 16 | + default: true |
3 | 17 |
|
4 | 18 | permissions: |
5 | 19 | actions: none |
@@ -36,28 +50,34 @@ jobs: |
36 | 50 | GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} |
37 | 51 |
|
38 | 52 | - run: ./gradlew publishPlugins |
| 53 | + if: ${{ github.event.inputs.gradle_publish == 'true' }} |
39 | 54 | env: |
40 | 55 | GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} |
41 | 56 | GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} |
42 | 57 |
|
43 | 58 | - name: Create GitHub Release |
44 | 59 | uses: ncipollo/release-action@v1 |
| 60 | + if: ${{ github.event.inputs.github_release == 'true' }} |
45 | 61 | with: |
46 | 62 | token: ${{ secrets.GITHUB_TOKEN }} |
47 | 63 | tag: "v${{ steps.getVersion.outputs.version }}" |
48 | 64 | name: "${{ github.event.repository.name }} v${{ steps.getVersion.outputs.version }}" |
49 | 65 | bodyFile: "UpcomingReleaseNotes.md" |
50 | 66 |
|
51 | 67 | - run: python ./ci-scripts/incrementVersion.py |
| 68 | + if: ${{ github.event.inputs.version_increment == 'true' }} |
52 | 69 | id: postReleaseVersionIncrement |
53 | 70 |
|
54 | 71 | - uses: stefanzweifel/git-auto-commit-action@v5 |
| 72 | + if: ${{ github.event.inputs.version_increment == 'true' }} |
55 | 73 | with: |
56 | 74 | commit_message: "Post release version increment to ${{ steps.postReleaseVersionIncrement.outputs.newVersion }} (from ${{ steps.postReleaseVersionIncrement.outputs.oldVersion }})" |
57 | 75 | file_pattern: build.gradle.kts README.md |
58 | 76 |
|
59 | 77 | - run: echo -n > UpcomingReleaseNotes.md |
| 78 | + if: ${{ github.event.inputs.github_release == 'true' }} |
60 | 79 | - uses: stefanzweifel/git-auto-commit-action@v5 |
| 80 | + if: ${{ github.event.inputs.github_release == 'true' }} |
61 | 81 | with: |
62 | 82 | commit_message: "Post release truncation of UpcomingReleaseNotes.md" |
63 | 83 | file_pattern: UpcomingReleaseNotes.md |
0 commit comments