2021-02-21 16:13:40 +03:00
|
|
|
name: Gradle release
|
2021-01-30 20:06:21 +03:00
|
|
|
|
|
|
|
on:
|
2021-01-30 20:23:15 +03:00
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- created
|
2021-01-30 20:06:21 +03:00
|
|
|
|
|
|
|
jobs:
|
2021-01-30 20:23:15 +03:00
|
|
|
build-ubuntu:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Install Chrome
|
|
|
|
run: |
|
|
|
|
sudo apt install -y libappindicator1 fonts-liberation
|
|
|
|
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
|
|
sudo dpkg -i google-chrome*.deb
|
|
|
|
- name: Cache gradle
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.gradle
|
|
|
|
build
|
|
|
|
~/.gradle
|
|
|
|
key: gradle
|
|
|
|
restore-keys: gradle
|
|
|
|
|
|
|
|
- name: Cache konan
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.konan/dependencies
|
|
|
|
~/.konan/kotlin-native-prebuilt-linux-*
|
|
|
|
key: ${{ runner.os }}-konan
|
|
|
|
restore-keys: ${{ runner.os }}-konan
|
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
|
|
|
- name: Run release task
|
|
|
|
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
|
|
|
|
|
|
|
build-osx:
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Cache gradle
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.gradle
|
|
|
|
build
|
|
|
|
~/.gradle
|
|
|
|
key: gradle
|
|
|
|
restore-keys: gradle
|
|
|
|
|
|
|
|
- name: Cache konan
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.konan/dependencies
|
|
|
|
~/.konan/kotlin-native-prebuilt-macos-*
|
|
|
|
key: ${{ runner.os }}-konan
|
|
|
|
restore-keys: ${{ runner.os }}-konan
|
|
|
|
- name: Build with Gradle
|
|
|
|
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
|
|
|
- name: Run release task
|
|
|
|
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
|
|
|
|
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Add msys to path
|
|
|
|
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
|
|
|
- name: Cache gradle
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.gradle
|
|
|
|
build
|
|
|
|
~/.gradle
|
|
|
|
key: ${{ runner.os }}-gradle
|
|
|
|
restore-keys: ${{ runner.os }}-gradle
|
|
|
|
|
|
|
|
- name: Cache konan
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.konan/dependencies
|
|
|
|
~/.konan/kotlin-native-prebuilt-mingw-*
|
|
|
|
key: ${{ runner.os }}-konan
|
|
|
|
restore-keys: ${{ runner.os }}-konan
|
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew --build-cache build
|
|
|
|
- name: Run release task
|
|
|
|
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
|
|
|
|