-
Notifications
You must be signed in to change notification settings - Fork 37
45 lines (40 loc) · 1.27 KB
/
gradle_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
name: Gradle Package
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up Java"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
- name: "Set up Gradle"
uses: gradle/actions/setup-gradle@v3
- name: "Gradle Build"
run: ./gradlew build --stacktrace --parallel
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: ./build/libs/
# The USERNAME and PASSWORD need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: "Publish to GitHub Packages and other Mavens"
run: ./gradlew publish --stacktrace
env:
BRANCH_NAME: ${{ github.ref }}
RUN_COUNT: ${{ github.run_number }}
REPO_NAME: ${{ github.repository }}
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPRUCEUI_MAVEN: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}