-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 975 Bytes
/
gradle.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
name: Java CI with Gradle
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-6.2.2
# - uses: eskatos/gradle-command-action@v1
# with:
# gradle-version: 6.2.2
# arguments: build
# build-root-directory: backend
# env:
# GITHUB_ACTOR: github-actions
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish artifact
env:
GITHUB_ACTOR: github-actions
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
echo "New version: ${NEW_VERSION}"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew -Pversion=${NEW_VERSION} publish