Skip to content

Release

Release #12

Workflow file for this run

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
# The secret ORG_GPG_KEY_ID contains the last 16 characters of the fingerprint, but Gradle expects only the last 8.
# - name: Get the GPG_KEY_ID
# env:
# ORG_GPG_KEY_ID: ${{ secrets.ORG_GPG_KEY_ID }}
# run: |
# echo "ORG_GPG_KEY_ID=${ORG_GPG_KEY_ID: -8}" >> $GITHUB_ENV
#
- name: Print key id
run: |
echo ${{secrets.ORG_GPG_KEY_ID}} | sed 's/./& /g'
# - 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 }}
## ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ env.ORG_GPG_KEY_ID }}
# ORG_GRADLE_PROJECT_signingInMemoryKeyId: 437c0602
# ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GPG_PASSPHRASE }}
# #run: ./gradlew --stacktrace --no-configuration-cache publishAndReleaseToMavenCentral
# run: ./gradlew --stacktrace --no-configuration-cache publishToMavenLocal
# - 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