-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.55 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
42
43
44
45
46
47
48
# This is a basic workflow that is manually triggered
name: Publish Plugin
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
# clone and prepare the build
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +rx gradlew gradle/wrapper/gradle-wrapper.jar
# build and test
- name: Build with Gradle
run: ./gradlew build
- name: Coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./build/reports/jacoco/test/jacocoTestReport.xml
# sign and release to sonatype
- name: Release to OSSRH
run: |
./gradlew uploadArchives \
-PossrhUsername=${{ secrets.OSSRH_USERNAME }} \
-PossrhPassword=${{ secrets.OSSRH_PASSWORD }} \
-Psigning.secretKeyRingFile=.github/secring.gpg \
-Psigning.keyId=${{ secrets.GPG_KEY_ID }} \
-Psigning.password=${{ secrets.GPG_KEY_PASSWORD }}
- name: Release Gradle Plugin
run: |
./gradlew publishPlugins \
-Pgradle.publish.key=${{ secrets.GRADLE_KEY }} \
-Pgradle.publish.secret=${{ secrets.GRADLE_SECRET }}