Merge pull request #28 from element-hq/version-2.37.14 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |