-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.11 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
name: Publish
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Set env
run: |
echo 'OSSRH_USERNAME=${{ secrets.OSSRH_USERNAME }}' >> $GITHUB_ENV
echo 'OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }}' >> $GITHUB_ENV
echo 'SIGNING_KEYID=${{ secrets.SIGNING_KEYID }}' >> $GITHUB_ENV
echo 'SIGNING_PASSWORD=${{ secrets.SIGNING_PASSWORD }}' >> $GITHUB_ENV
echo 'SIGNING_KEY<<EOF' >> $GITHUB_ENV
echo '${{ secrets.SIGNING_KEY }}' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Gradle clean
run: |
./gradlew clean
- name: Gradle build
run: |
./gradlew build
- name: Gradle publish to mavenLocal
run: |
PUBLISH_PRODUCTION=1 ./gradlew publishToMavenLocal
- name: Gradle publish to maven central
run: |
PUBLISH_PRODUCTION=1 ./gradlew publish