Release Build #21
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.1 | |
required: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- id: setup-java-17 | |
name: Setup Java 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- uses: burrunan/[email protected] | |
with: | |
remote-build-cache-proxy-enabled: false | |
arguments: build --stacktrace | |
properties: | | |
release.version=${{ github.event.inputs.version }} | |
org.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }} | |
- uses: burrunan/[email protected] | |
with: | |
remote-build-cache-proxy-enabled: false | |
arguments: final closeAndReleaseSonatypeStagingRepository --stacktrace | |
properties: | | |
release.version=${{ 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 }})" |