-
Notifications
You must be signed in to change notification settings - Fork 243
50 lines (42 loc) · 1.61 KB
/
publish-snapshot.yaml
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
name: Publish Snapshot
on:
push:
branches:
- main
workflow_dispatch:
jobs:
publish:
# remove this check when your secrets are setup and you're ready to publish
if: ${{ github.repository == 'cortinico/kotlin-android-template'}}
runs-on: [ubuntu-latest]
env:
GRADLE_OPTS: -Dorg.gradle.parallel=false
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Publish to Maven Local
run: ./gradlew publishToMavenLocal
env:
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_USE_SNAPSHOT: true
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: 'snapshot-artifacts'
path: '~/.m2/repository/'
- name: Publish to the Snapshot Repository
run: ./gradlew publishReleasePublicationToSnapshotRepository
env:
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_USE_SNAPSHOT: true