-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.76 KB
/
publish_api.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Logvue Publish
env:
GITHUB_DEPLOY: 'false'
on:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
name: Release build and publish
continue-on-error: false
runs-on: ubuntu-latest
environment: Production
strategy:
fail-fast: true
matrix:
jdk: [ 18 ]
steps:
- name: Check out the source code
uses: actions/checkout@v2
- name: Download OpenJDK ${{ matrix.jdk }}
id: download-jdk
uses: sormuras/download-jdk@v1
with:
feature: ${{ matrix.jdk }}
- name: Set up OpenJDK ${{ matrix.jdk }}
id: setup-java
uses: actions/setup-java@v2
if: always() && steps.download-jdk.outcome == 'success'
with:
distribution: jdkfile
java-version: ${{ env.JDK_VERSION }}
jdkFile: ${{ env.JDK_FILE }}
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Runs upload, and then closes & releases the repository
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}