-
Notifications
You must be signed in to change notification settings - Fork 34
109 lines (93 loc) · 3.44 KB
/
publish.yml
File metadata and controls
109 lines (93 loc) · 3.44 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Publish a new Release
on:
push:
tags:
- '3.*'
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: 'Tag to use for the release and changelog'
concurrency:
group: "publish"
cancel-in-progress: true
jobs:
debugger-macos:
uses: ./.github/workflows/desktop-macos.yml
debugger-linux:
uses: ./.github/workflows/desktop-linux.yml
debugger-win:
uses: ./.github/workflows/desktop-win.yml
publish:
# needs: [ debugger-macos, debugger-linux, debugger-win ]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Decode Keystore
id: decode_keystore
env:
SIGNING_KEYSTORE_BASE64: ${{ secrets.KEYSTORE_B64 }}
KEYSTORE_PATH: ./certificates/keystore.jks
run: |
echo $SIGNING_KEYSTORE_BASE64 | base64 --decode > $KEYSTORE_PATH
echo "keystore_path=$KEYSTORE_PATH" >> $GITHUB_OUTPUT
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
check-latest: true
java-version: 23
cache: 'gradle'
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v5
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" | base64 --decode > local.properties
- name: Cache konan directory
uses: actions/cache@v5
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('*.gradle.kts', 'buildSrc/*') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Assemble android sample
run: ./gradlew :sample:assembleRelease
- name: Publish to sonatype
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishToMavenCentral --no-configuration-cache
- name: Generate Changelog
uses: mikepenz/release-changelog-builder-action@v6
id: build_changelog
with:
commitMode: true
configuration: ".github/changelog_config.json"
- name: Publish new plugin version
run: ./gradlew debugger:ideplugin:publishPlugin --no-configuration-cache
env:
CHANGELOG: ${{steps.build_changelog.outputs.changelog}}
# TODO: Use matrix strat and attach artifacts to the release
- name: Create GH release
uses: ncipollo/release-action@v1.20.0
id: create_release
with:
draft: true
artifactErrorsFailBuild: true
prerelease: false
artifacts: sample/build/outputs/apk/release/pro.respawn.flowmvi.sample.apk
body: ${{steps.build_changelog.outputs.changelog}}
tag: ${{ inputs.tag != '' && inputs.tag || github.ref_name }}
env:
GITHUB_TOKEN: ${{ github.token }}