-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (45 loc) · 1.78 KB
/
release-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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/checkout@v2.3.4
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/gradle-cache-action@v1.10
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/gradle-cache-action@v1.10
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 }})"