Skip to content

Commit a9cf7a7

Browse files
committed
release workflow
1 parent cbf822e commit a9cf7a7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release JVM probe
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 11
14+
uses: actions/setup-java@v2
15+
with:
16+
java-version: '11'
17+
distribution: 'adopt'
18+
cache: gradle
19+
20+
- name: Export Properties
21+
id: properties
22+
shell: bash
23+
run: |
24+
PROPERTIES="$(./gradlew properties --console=plain -q)"
25+
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
26+
echo "::set-output name=version::$VERSION"
27+
echo "SPP_RELEASE_VERSION=${VERSION/-SNAPSHOT/}" >> $GITHUB_ENV
28+
29+
- name: Publish Release Package
30+
run: ./gradlew publish -Dbuild.profile=release -PprobeVersion=$SPP_RELEASE_VERSION
31+
env:
32+
GH_PUBLISH_USERNAME: $GITHUB_ACTOR
33+
GH_PUBLISH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)