forked from matrix-org/matrix-rich-text-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (96 loc) · 3.33 KB
/
publish.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
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
110
111
112
113
114
115
116
name: Publish
on:
push:
tags:
- '*'
workflow_dispatch:
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 4 --no-daemon
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ANDROID_SIGNING_GPG }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ANDROID_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
jobs:
ios:
name: Publish to Swift repo
runs-on: macos-14
steps:
- name: 🧮 Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.76
profile: minimal
override: true
- name: Install targets
run: make targets-ios
- name: Set Xcode 15.4
run: sudo xcode-select -switch /Applications/Xcode_15.4.app
- name: Set SwiftPM Repo credentials
uses: de-vri-es/setup-git-credentials@v2
with:
credentials: https://${{secrets.PAT_USER}}:${{secrets.PAT}}@github.com/
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Release iOS
working-directory: platforms/ios/tools/release
run: swift run release --version ${{ steps.tag.outputs.tag }}
env:
SWIFT_RELEASE_TOKEN: ${{ secrets.PAT }}
android:
name: Publish to maven
runs-on: ubuntu-latest # No need for macos-latest if there are no UI tests
steps:
- name: 🧮 Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ☕️ Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: 🔧 Rust & Cargo cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: 🦀 Install Rust targets
run: make targets-android
- name: ⬆️ Publish to Sonatype
uses: gradle/gradle-build-action@v3
with:
build-root-directory: platforms/android
arguments: publishAndReleaseToMavenCentral
npm:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- name: 🧮 Checkout code
uses: actions/checkout@v4
- name: 🦀 Build Rust
run: "make web"
- name: 🔧 Yarn cache
uses: actions/setup-node@v4
with:
cache: "yarn"
cache-dependency-path: platforms/web/yarn.lock
registry-url: "https://registry.npmjs.org"
- name: 🔨 Install dependencies
run: "yarn install --pure-lockfile"
working-directory: platforms/web
- name: 🪚 Build
run: "yarn build"
working-directory: platforms/web
- name: 🚀 Publish to npm
id: npm-publish
uses: JS-DevTools/npm-publish@v3
with:
package: platforms/web/package.json
token: ${{ secrets.NPM_TOKEN }}
access: public