-
-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (42 loc) · 1.4 KB
/
publish-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
53
54
55
56
57
name: Publish Snapshot
on:
push:
branches:
- main
concurrency:
group: "publish-snapshot"
cancel-in-progress: true
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
jobs:
extract-version:
name: Extract Library Version
if: github.repository == 'MayakaApps/Kache'
uses: ./.github/workflows/extract-version.yml
publish-library:
name: Publish Snapshot
needs: extract-version
runs-on: macOS-14
if: github.repository == 'MayakaApps/Kache' && endsWith(needs.extract-version.outputs.library-version, '-SNAPSHOT')
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish
run: ./gradlew --no-configuration-cache publishAllPublicationsToMavenCentralRepository
publish-docs:
name: Publish Documentation
needs: extract-version
if: github.repository == 'MayakaApps/Kache' && endsWith(needs.extract-version.outputs.library-version, '-SNAPSHOT')
uses: ./.github/workflows/publish-docs.yml
with:
library-version: ${{ needs.extract-version.outputs.library-version }}