This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
Release #20
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: | |
description: 'Version name (without v)' | |
required: true | |
type: string | |
snapshot: | |
description: 'Next SNAPSHOT version (without v). If empty, uses current value' | |
required: false | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.OWNER_PAT }} | |
fetch-depth: 0 # fetch all history | |
- name: Update Git user | |
run: | | |
git config --local user.name "Chris Banes" | |
git config --local user.email [email protected] | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- uses: gradle/gradle-build-action@v2 | |
with: | |
# Disable writing to cache. Don't want to spoil the main cache | |
cache-read-only: true | |
- name: Release | |
if: ${{ inputs.version }} | |
run: ./scripts/release.sh ${{ inputs.version }} ${{ inputs.snapshot }} | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }} | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
generate_release_notes: true | |
tag_name: v${{ inputs.version }} |