forked from MirrorHub/authlib-injector
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
version: 2
|
|
general:
|
|
branches:
|
|
only:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/openjdk:8-jdk
|
|
working_directory: ~/authlib-injector
|
|
environment:
|
|
JVM_OPTS: -Xmx3200m
|
|
TERM: dumb
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- v1-cache
|
|
- run: 'git clone --single-branch --branch=toolchain --depth=1 git@github.com:yushijinhun/authlib-injector.yushi.moe ~/tools'
|
|
- run: 'echo $(( $(~/tools/get-latest-build-number.sh) + 1 )) > ~/build_number && echo "Build Number: $(<~/build_number)"'
|
|
- run: '~/tools/authlib-injector-deploy.sh --local-repo ~/authlib-injector.yushi.moe update-local-repo'
|
|
- run: 'AI_BUILD_NUMBER="$(<~/build_number)" gradle dependencies'
|
|
- run: 'AI_BUILD_NUMBER="$(<~/build_number)" gradle'
|
|
- store_artifacts:
|
|
path: ~/authlib-injector/build/libs
|
|
- run: '~/tools/authlib-injector-deploy.sh upload "$(<~/build_number)" ~/authlib-injector/build/libs/*.jar'
|
|
- save_cache:
|
|
paths:
|
|
- ~/.gradle
|
|
- ~/authlib-injector.yushi.moe
|
|
key: v1-cache-{{ epoch }}
|