-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.37 KB
/
snapshot.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
# Publish a Snapshot Release
name: Snapshot
on:
push:
branches:
- 'develop'
jobs:
build:
name: Publish snapshot
runs-on: ubuntu-latest
steps:
# ================================
# SHALLOW CLONE
# ================================
- name: Shallow clone
uses: actions/checkout@v3
# ================================
# SET UP JDK
# ================================
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-package: jdk
java-version: 21
# ================================
# EXPORT GRADLE PROJECT PROPERTIES
# ================================
- name: Export Gradle project properties
id: properties
run: './gradlew properties -q | grep ": " | sed "s/: /=/" >> "$GITHUB_OUTPUT"'
# ================================
# PUBLISH
# ================================
- name: Publish snapshot
if: endsWith(steps.properties.outputs.version, '-SNAPSHOT')
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
uses: gradle/gradle-build-action@v2
with:
arguments: publish -Psnapshot --info --scan