-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (62 loc) · 2.25 KB
/
publication.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
64
name: 'Publication'
on:
push:
branches:
- main
release:
types: [published]
jobs:
publish:
name: 'Publish'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: 'Install system packages'
run: sudo apt-get install -y --no-install-recommends clang gcc make sed tcl
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: 'Gradle'
run: |
echo 'org.gradle.caching=false' >> gradle.properties
echo 'org.gradle.configuration-cache=false' >> gradle.properties
- name: 'Unit tests'
run: ./gradlew :selekt-android:testDebugUnitTest :selekt-java:test
- name: 'Build Selekt'
run: |
./gradlew clean \
:OpenSSL:assembleArm64-v8a \
:OpenSSL:assembleArmeabi-v7a \
:OpenSSL:assembleX86 \
:OpenSSL:assembleX86_64
./gradlew :SQLite3:amalgamate
./gradlew assembleRelease
- name: 'Publish snapshot to OSSRH'
if: github.event_name == 'push'
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_KEY_PASSPHRASE }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_USER_TOKEN_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USER_TOKEN_USERNAME }}
run: |
./gradlew \
publishMainPublicationToSonatypeRepository \
closeSonatypeStagingRepository
- name: 'Publish release to OSSRH'
if: github.event_name == 'release' && github.event.action == 'published'
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_KEY_PASSPHRASE }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_USER_TOKEN_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USER_TOKEN_USERNAME }}
run: |
./gradlew \
-Prelease \
publishMainPublicationToSonatypeRepository \
closeAndReleaseSonatypeStagingRepository