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-07-31 16:45:45 -04:00
|
|
|
name: Build artifacts and create draft release
|
2021-01-21 14:15:05 +03:30
|
|
|
needs: check_wrapper
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Cancel previous runs
|
2021-06-04 13:35:20 +04:30
|
|
|
uses: styfle/cancel-workflow-action@0.9.0
|
2021-01-21 14:15:05 +03:30
|
|
|
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
|
|
|
|
2021-07-31 16:45:45 -04:00
|
|
|
- name: Set up JDK
|
2021-01-21 14:15:05 +03:30
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-07-31 16:45:45 -04:00
|
|
|
java-version: 11
|
2021-01-21 14:15:05 +03:30
|
|
|
|
2021-01-21 22:39:22 +03:30
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.gradle
|
|
|
|
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2021-07-31 16:45:45 -04:00
|
|
|
- name: Generate android.jar
|
2021-01-21 14:23:22 +03:30
|
|
|
run: |
|
2021-07-31 16:45:45 -04:00
|
|
|
./AndroidCompat/getAndroid.sh
|
2021-02-13 15:18:57 +03:30
|
|
|
|
2021-07-31 16:45:45 -04:00
|
|
|
- name: Build project
|
2021-01-21 14:15:05 +03:30
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
2021-07-23 18:45:49 -04:00
|
|
|
arguments: :server:shadowJar --stacktrace
|
2021-01-21 14:15:05 +03:30
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
|
2021-02-14 22:49:40 +03:30
|
|
|
- name: Upload Release
|
2021-05-24 15:37:25 +04:30
|
|
|
uses: xresloader/upload-to-github-release@v1
|
2021-02-13 13:39:52 +03:30
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-07-31 16:45:45 -04:00
|
|
|
file: "server/build/*.jar"
|
2021-02-14 22:49:40 +03:30
|
|
|
tags: true
|
2021-02-14 22:20:50 +03:30
|
|
|
draft: true
|
2021-07-23 18:45:49 -04:00
|
|
|
verbose: true
|