2021-04-10 10:39:47 +04:30
|
|
|
name: CI Publish
|
2021-01-21 14:15:05 +03:30
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-02-13 13:32:59 +03:30
|
|
|
tags:
|
|
|
|
- 'v*'
|
2021-01-21 14:15:05 +03:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
check_wrapper:
|
|
|
|
name: Validate Gradle Wrapper
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Validate Gradle Wrapper
|
|
|
|
uses: gradle/wrapper-validation-action@v1
|
|
|
|
|
|
|
|
build:
|
2021-05-19 04:28:57 +04:30
|
|
|
name: Build artifacts and release
|
2021-01-21 14:15:05 +03:30
|
|
|
needs: check_wrapper
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Cancel previous runs
|
|
|
|
uses: styfle/cancel-workflow-action@0.5.0
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
|
|
|
|
2021-05-19 04:30:21 +04:30
|
|
|
- name: Checkout ${{ github.ref }}
|
2021-01-21 14:15:05 +03:30
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2021-05-19 04:26:20 +04:30
|
|
|
ref: ${{ github.ref }}
|
2021-01-21 14:15:05 +03:30
|
|
|
path: master
|
2021-01-21 16:01:55 +03:30
|
|
|
fetch-depth: 0
|
2021-01-21 14:15:05 +03:30
|
|
|
|
|
|
|
- name: Set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
2021-01-21 22:39:22 +03:30
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: |
|
|
|
|
cd master
|
|
|
|
mkdir -p ~/.gradle
|
|
|
|
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2021-02-13 15:18:57 +03:30
|
|
|
- name: Download android.jar
|
2021-01-21 14:23:22 +03:30
|
|
|
run: |
|
|
|
|
cd master
|
2021-02-13 15:18:57 +03:30
|
|
|
curl https://raw.githubusercontent.com/AriaMoradi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
|
|
|
|
2021-02-13 15:30:15 +03:30
|
|
|
- name: Cache node_modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
**/react/node_modules
|
2021-05-17 11:20:24 +04:30
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }}
|
2021-01-21 14:23:22 +03:30
|
|
|
|
2021-05-17 11:20:24 +04:30
|
|
|
- name: Build and copy webUI, Build Jar
|
2021-01-21 14:15:05 +03:30
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
build-root-directory: master
|
|
|
|
wrapper-directory: master
|
2021-05-17 11:20:24 +04:30
|
|
|
arguments: :webUI:copyBuild :server:shadowJar --stacktrace
|
2021-01-21 14:15:05 +03:30
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
|
2021-05-19 02:42:14 +04:30
|
|
|
- name: make windows packages
|
2021-05-17 12:30:15 +04:30
|
|
|
run: |
|
|
|
|
cd master/scripts
|
2021-05-19 02:42:14 +04:30
|
|
|
./windows32-bundler.sh
|
|
|
|
./windows64-bundler.sh
|
2021-05-17 12:30:15 +04:30
|
|
|
|
2021-02-14 22:49:40 +03:30
|
|
|
- name: Upload Release
|
2021-02-14 22:51:22 +03:30
|
|
|
uses: xresloader/upload-to-github-release@master
|
2021-02-13 13:39:52 +03:30
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-05-17 11:59:59 +04:30
|
|
|
file: "master/server/build/*.jar;master/server/build/*.zip"
|
2021-02-14 22:49:40 +03:30
|
|
|
tags: true
|
2021-02-14 22:20:50 +03:30
|
|
|
draft: true
|
2021-02-14 22:49:40 +03:30
|
|
|
verbose: true
|