66 lines
1.5 KiB
YAML
Raw Normal View History

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:
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
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:
ref: ${{ github.ref }}
2021-01-21 14:15:05 +03:30
- name: Set up JDK
2021-01-21 14:15:05 +03:30
uses: actions/setup-java@v1
with:
java-version: 11
2021-01-21 14:15:05 +03:30
- name: Copy CI gradle.properties
run: |
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Generate android.jar
2021-01-21 14:23:22 +03:30
run: |
./AndroidCompat/getAndroid.sh
- 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:
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