ci: Enable Gradle stacktraces in the release workflow #14
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: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+-RC[0-9]+" | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Git tag to release from" | |
required: true | |
type: string | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
jobs: | |
publish: | |
env: | |
ORT_SERVER_VERSION: ${{ inputs.tag || github.ref_name }} | |
permissions: | |
contents: write | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.ORT_SERVER_VERSION }} | |
fetch-depth: 0 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
dependency-graph: generate-and-submit | |
- name: Publish to OSSRH | |
env: | |
GITHUB_DEPENDENCY_GRAPH_REF: refs/heads/main | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: true | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GPG_PRIVATE_KEY }} | |
# secrets.ORG_GPG_KEY_ID contains the wrong value, so hardcode the key id as found on: | |
# https://keyserver.ubuntu.com/pks/lookup?search=apoapsis-dev&fingerprint=on&op=index | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: 437c0602 | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GPG_PASSPHRASE }} | |
run: ./gradlew --stacktrace --no-configuration-cache publishAndReleaseToMavenCentral | |
- name: Generate Release Notes | |
# Temporary implementation for the very first release. The release notes for this will be written by hand as they | |
# would otherwise contain the complete commit history. | |
run: echo "Initial release!" > RELEASE_NOTES.md | |
#run: ./gradlew -q printChangeLog > RELEASE_NOTES.md | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create $ORT_SERVER_VERSION --notes-file RELEASE_NOTES.md |