-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.45 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
58
59
60
61
62
63
name: Publish Snapshot
on:
push:
branches: [ main ]
permissions:
contents: write
concurrency:
group: publish-snapshot-${{github.ref_name}}
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Git Short SHA
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "GIT_COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Build Artifacts & Documentation
run: ./gradlew build dokkaHtmlMultiModule -x test
env:
GIT_COMMIT_SHA: ${{ env.GIT_COMMIT_SHORT_SHA }}
- name: Publish Maven Artifacts (Snapshot)
run: >-
./gradlew
-PsonatypeUsername=${{ secrets.OSSRH_TOKEN_USER }} -PsonatypePassword=${{ secrets.OSSRH_TOKEN_PASS }}
:generator:publishToSonatype
:cli:publishToSonatype
-x test
- name: Publish Docker
run: >-
./gradlew
--continue
-Djib.to.auth.username=${{ secrets.DOCKER_PUBLISH_USER }}
-Djib.to.auth.password=${{ secrets.DOCKER_PUBLISH_TOKEN }}
build
jib
-x test
- name: Publish Documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
clean: false
folder: build/dokka