This repository has been archived by the owner on May 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (74 loc) · 2.63 KB
/
github-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
pull_request:
types:
- opened
- synchronize
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
if: "!contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
KORD_TEST_TOKEN: ${{ secrets.KORD_TEST_TOKEN }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- run: export GRADLE_USER_HOME=`pwd`/.gradle
- run: echo "name=RELEASE_TAG::${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Java JDK 1.8
uses: actions/[email protected]
with:
java-version: 1.8
- name: Gradle (Build)
run: gradle --stacktrace --info --build-cache assemble
- name: Caching
uses: actions/[email protected]
with:
key: "$GITHUB_SHA"
path: |
~/builds
~/build
~/.gradle
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Gradle (Testing)
run: gradle --stacktrace --info check
release:
name: Publish artifacts
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
env:
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15
- name: Publish with Gradle
run: gradle publishAllPublicationsToMavenRepository