Release Build #25
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 Build" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: The version to tag the release with, e.g., 1.2.0, 1.2.1-alpha, or 1.2.0.1 for a patch release of the 1.2.0 proto release | |
required: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: setup-java-17 | |
name: Setup Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- uses: burrunan/gradle-cache-action@v1.10 | |
with: | |
remote-build-cache-proxy-enabled: false | |
arguments: build --stacktrace | |
properties: | | |
release.version.prop=${{ github.event.inputs.version }} | |
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }} | |
- uses: burrunan/gradle-cache-action@v1.10 | |
with: | |
remote-build-cache-proxy-enabled: false | |
arguments: final closeAndReleaseSonatypeStagingRepository --stacktrace | |
properties: | | |
release.version.prop=${{ github.event.inputs.version }} | |
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }} | |
env: | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: > | |
gh release create v${{ github.event.inputs.version }} --title "Release v${{ github.event.inputs.version }}-alpha" --notes "Java Bindings for [OTLP v${{ github.event.inputs.version }}](https://github.com/open-telemetry/opentelemetry-proto/releases/tag/v${{ github.event.inputs.version }})" |