Skip to content

Commit

Permalink
chore: Add release dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Apr 2, 2024
1 parent bdf8583 commit 2a38564
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,24 @@ on:
tag:
description: 'Tag to release'
required: true
dry-run:
description: Dry-run
required: false
default: true
type: boolean

run-name: >-
${{
github.event_name == 'workflow_dispatch' && format(
'{0}: {1} {2}',
github.workflow,
inputs.tag,
fromJSON('["", " (dry-run)"]')[inputs.dry-run]
) || ''
}}
# Ensure that only a single release automation workflow can run at a time.
concurrency: Release automation

# Environment variables
# https://docs.github.com/en/actions/learn-github-actions/variables
Expand Down Expand Up @@ -51,7 +68,7 @@ jobs:
ORG_GRADLE_PROJECT_githubUser: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}
# com.javiersc.semver.gradle.plugin should pick the actual tag
run: ./gradlew publish -Ppublish.central=true --stacktrace
run: ./gradlew publish -Ppublish.central=${{ inputs.dry-run && 'false' || 'true' }} --stacktrace

# Don't forget to deploy the release to central
# * 'Close' the repo to trigger the evaluations of to components against the requirements
Expand Down

0 comments on commit 2a38564

Please sign in to comment.