forked from real-logic/agrona
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1.34 KB
/
publish.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
name: Publish a release to the Maven Central Repository
on:
repository_dispatch:
types: [publish_artifacts]
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail"
jobs:
build:
runs-on: ubuntu-latest
name: Release task
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.gitRef }}
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Gradle wrappers
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 8
- name: Publish a release
run: ./gradlew publish
env:
SIGNING_GPG_SECRET_KEY: ${{ secrets.signingKey }}
SIGNING_GPG_PASSWORD: ${{ secrets.signingPassword }}
OSSRH_USERNAME: ${{ secrets.ossrhUsername }}
OSSRH_PASSWORD: ${{ secrets.ossrhPassword }}