Skip to content

Commit 320fac7

Browse files
[CD] Updateallow enabling/disabling gradle publish, github release and version increment
1 parent 7f04829 commit 320fac7

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
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
317

418
permissions:
519
actions: none
@@ -36,28 +50,34 @@ jobs:
3650
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
3751

3852
- run: ./gradlew publishPlugins
53+
if: ${{ github.event.inputs.gradle_publish == 'true' }}
3954
env:
4055
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
4156
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
4257

4358
- name: Create GitHub Release
4459
uses: ncipollo/release-action@v1
60+
if: ${{ github.event.inputs.github_release == 'true' }}
4561
with:
4662
token: ${{ secrets.GITHUB_TOKEN }}
4763
tag: "v${{ steps.getVersion.outputs.version }}"
4864
name: "${{ github.event.repository.name }} v${{ steps.getVersion.outputs.version }}"
4965
bodyFile: "UpcomingReleaseNotes.md"
5066

5167
- run: python ./ci-scripts/incrementVersion.py
68+
if: ${{ github.event.inputs.version_increment == 'true' }}
5269
id: postReleaseVersionIncrement
5370

5471
- uses: stefanzweifel/git-auto-commit-action@v5
72+
if: ${{ github.event.inputs.version_increment == 'true' }}
5573
with:
5674
commit_message: "Post release version increment to ${{ steps.postReleaseVersionIncrement.outputs.newVersion }} (from ${{ steps.postReleaseVersionIncrement.outputs.oldVersion }})"
5775
file_pattern: build.gradle.kts README.md
5876

5977
- run: echo -n > UpcomingReleaseNotes.md
78+
if: ${{ github.event.inputs.github_release == 'true' }}
6079
- uses: stefanzweifel/git-auto-commit-action@v5
80+
if: ${{ github.event.inputs.github_release == 'true' }}
6181
with:
6282
commit_message: "Post release truncation of UpcomingReleaseNotes.md"
6383
file_pattern: UpcomingReleaseNotes.md

0 commit comments

Comments
 (0)