Release #13
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: | |
release: | |
description: Is release? (Will create tag and update version) | |
required: true | |
default: false | |
type: boolean | |
release-version: | |
description: Released version (x.y.z) | |
required: true | |
type: string | |
next-version: | |
description: Next version (x.y.z) | |
required: true | |
type: string | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
env: | |
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail' | |
jobs: | |
# ci: | |
# uses: ./.github/workflows/ci.yml | |
# | |
# ci-low-cadence: | |
# uses: ./.github/workflows/ci-low-cadence.yml | |
# | |
# codeql: | |
# uses: ./.github/workflows/codeql.yml | |
pre-release: | |
name: Update version, tag repo, and return sha | |
# needs: [ ci, ci-low-cadence, codeql ] | |
uses: ./.github/workflows/pre-release.yml | |
with: | |
release: ${{ inputs.release }} | |
version: ${{ inputs.release-version }} | |
release: | |
name: Release java artifacts | |
permissions: | |
contents: write | |
packages: write | |
needs: pre-release | |
runs-on: self-hosted | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.pre-release.outputs.sha }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Publish a release | |
run: ./gradlew publish | |
env: | |
SIGNING_GPG_SECRET_KEY: ${{ secrets.signingKey }} | |
SIGNING_GPG_PASSWORD: ${{ secrets.signingPassword }} | |
OSSRH_USERNAME: ${{ secrets.ossrhUsername }} | |
OSSRH_PASSWORD: ${{ secrets.ossrhPassword }} | |
post-release: | |
name: Update version | |
needs: release | |
uses: ./.github/workflows/post-release.yml | |
with: | |
release: ${{ inputs.release }} | |
version: ${{ inputs.next-version }} |