-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (58 loc) · 2.33 KB
/
publish_kmp_lib.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
65
66
67
name: Sign and Publish KMP Library
on:
workflow_dispatch:
inputs:
versionName:
description: 'Version Name (eg. 0.9.0)'
required: true
jobs:
build:
name: 🔨 Build, Test & Publish KMP
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with gradle
run: ./gradlew :daraja:build --stacktrace
- name: Execute unit tests
run: ./gradlew :daraja:allTests --stacktrace
- name: Sign and Publish Android Library
run: ./gradlew clean publishAllPublicationsToSonatypeRepository --max-workers 1 --stacktrace
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
POM_VERSION: ${{ github.event.inputs.versionName }}
POM_NAME: ${{ secrets.POM_NAME }}
POM_DESCRIPTION: ${{ secrets.POM_DESCRIPTION }}
POM_GROUPID: ${{ secrets.POM_GROUPID }}
POM_ARTIFACTID: ${{secrets.POM_ARTIFACTID}}
POM_URL: ${{ secrets.POM_URL }}
POM_DEVELOPER_ID: ${{ secrets.POM_DEVELOPER_ID }}
POM_DEVELOPER_NAME: ${{ secrets.POM_DEVELOPER_NAME }}
POM_DEVELOPER_EMAIL: ${{ secrets.POM_DEVELOPER_EMAIL }}
POM_LICENSE_NAME: ${{ secrets.POM_LICENSE_NAME }}
POM_LICENSE_URL: ${{ secrets.POM_LICENSE_URL }}
POM_ISSUE_SYSTEM: ${{ secrets.POM_ISSUE_SYSTEM }}
POM_ISSUE_URL: ${{ secrets.POM_ISSUE_SYSTEM }}
POM_SCM_CONNECTION: ${{ secrets.POM_SCM_CONNECTION }}
POM_SCM_DEVELOPER_CONNECTION: ${{ secrets.POM_SCM_DEVELOPER_CONNECTION }}
POM_SCM_URL: ${{ secrets.POM_SCM_URL }}
SIGNING_ID: ${{ secrets.SIGNING_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: true
tag_name: ${{ github.event.inputs.versionName }}
name: Release ${{ github.event.inputs.versionName }}