Release #54
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
description: Package version to publish under | |
skipGradlePluginPortal: | |
description: Should we skip publishing to Gradle Plugin Portal | |
required: false | |
default: "true" | |
skipGitHub: | |
description: Should we skip publishing to GitHub | |
required: false | |
default: "true" | |
skipMavenCentral: | |
description: Should we skip publishing to Maven Central | |
required: false | |
default: "true" | |
skipPages: | |
description: Should we skip publishing to GitHub Pages | |
required: false | |
default: "true" | |
release: | |
types: [ created ] | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
jobs: | |
version: | |
name: Resolve Version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.resolve.outputs.version }} | |
steps: | |
- name: resolve | |
id: resolve | |
run: | | |
VERSION=${VERSION:=${{ github.event.inputs.version }}} | |
VERSION=${VERSION/v} | |
echo "VERSION=${VERSION//v}" >> $GITHUB_ENV | |
echo "version=${VERSION//v}" >> $GITHUB_OUTPUT | |
- name: report | |
run: | | |
echo "VERSION=${{ env.VERSION }}" | |
echo "steps.resolve.outputs.version=${{ steps.resolve.outputs.version }}" | |
check: | |
uses: ./.github/workflows/check.yml | |
release-Pages: | |
name: "Release: GitHub Pages" | |
needs: [ check, version ] | |
if: ${{ github.event.inputs.skipPages != 'true' }} | |
uses: ./.github/workflows/deploy-pages.yml | |
with: | |
version: ${{ needs.version.outputs.version }} | |
release-GradlePluginPortal: | |
name: "Release: GradlePluginPortal" | |
runs-on: ubuntu-latest | |
needs: [ check, version ] | |
if: ${{ github.event.inputs.skipGradlePluginPortal != 'true' }} | |
env: | |
VERSION: ${{ needs.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Restore Gradle cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: 'adopt' | |
- name: Publish to Gradle Plugin Portal | |
shell: bash | |
run: | | |
./gradlew publishPlugins \ | |
-Pgradle.publish.key="${{ secrets.GRADLE_PUBLISH_KEY }}" \ | |
-Pgradle.publish.secret="${{ secrets.GRADLE_PUBLISH_SECRET }}" \ | |
-Pversion="${{ env.VERSION }}" | |
env: | |
SIGNING_PGP_KEY: ${{ secrets.SIGNING_PGP_KEY }} | |
SIGNING_PGP_PASSWORD: ${{ secrets.SIGNING_PGP_PASSWORD }} | |
release-GitHub: | |
name: "Release: GitHub" | |
runs-on: ubuntu-latest | |
needs: [ check, version ] | |
if: ${{ github.event.inputs.skipGitHub != 'true' }} | |
continue-on-error: true | |
env: | |
VERSION: ${{ needs.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Restore Gradle cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: 'adopt' | |
- name: Publish to GitHub Packages | |
shell: bash | |
run: | | |
./gradlew deployGithub \ | |
-Pversion="${{ env.VERSION }}" | |
env: | |
SIGNING_PGP_KEY: ${{ secrets.SIGNING_PGP_KEY }} | |
SIGNING_PGP_PASSWORD: ${{ secrets.SIGNING_PGP_PASSWORD }} | |
REPOSITORY_GITHUB_USERNAME: ${{ github.actor }} | |
REPOSITORY_GITHUB_PASSWORD: ${{ github.token }} | |
release-MavenCentral: | |
name: "Release: MavenCentral" | |
runs-on: ubuntu-latest | |
needs: [ check, version ] | |
if: ${{ github.event.inputs.skipMavenCentral != 'true' }} | |
env: | |
VERSION: ${{ needs.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Restore Gradle cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: 'adopt' | |
- name: Publish to MavenCentral | |
shell: bash | |
run: | | |
./gradlew deployCentralPortal \ | |
-Pversion="${{ env.VERSION }}" | |
env: | |
SIGNING_PGP_KEY: ${{ secrets.SIGNING_PGP_KEY }} | |
SIGNING_PGP_PASSWORD: ${{ secrets.SIGNING_PGP_PASSWORD }} | |
REPOSITORY_CENTRAL_USERNAME: ${{ secrets.REPOSITORY_CENTRAL_USERNAME }} | |
REPOSITORY_CENTRAL_PASSWORD: ${{ secrets.REPOSITORY_CENTRAL_PASSWORD }} |