Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit 2b8a180

Browse files
authored
Create gradle-publish.yml
1 parent f8c70c1 commit 2b8a180

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7+
8+
name: Gradle Package
9+
10+
on:
11+
- pull_request
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v3
22+
with:
23+
java-version: '11'
24+
distribution: 'temurin'
25+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
26+
settings-path: ${{ github.workspace }} # location for the settings.xml file
27+
28+
- name: Build with Gradle
29+
run: ./gradlew build
30+
31+
- name: Publish to GitHub Packages
32+
run: ./gradlew publish
33+
env:
34+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
35+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
36+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
37+
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
38+
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}

0 commit comments

Comments
 (0)