-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (30 loc) · 1.07 KB
/
release.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
name: Release JVM probe
on:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
#Note: must use < JDK 16 to avoid Stream.toList() overriding StreamsKT.toList() (KT-47039)
#Todo: might be fixed by 3a16a8c4e99d22845ca8529923e0a01ef8f7ec17
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
echo "::set-output name=version::$VERSION"
echo "SPP_RELEASE_VERSION=${VERSION/-SNAPSHOT/}" >> $GITHUB_ENV
- name: Publish Release Package
run: ./gradlew publish -Dbuild.profile=release -PprobeVersion=$SPP_RELEASE_VERSION
env:
GH_PUBLISH_USERNAME: $GITHUB_ACTOR
GH_PUBLISH_TOKEN: ${{ secrets.GITHUB_TOKEN }}