This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.83 KB
/
cashierci.yaml
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
# This workflow will build a Java project with Gradle
# See Also: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Cashier CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# The checkout step downloads a copy of your repository on the runner.
- uses: actions/checkout@v2
# The setup-java step configures the Java 11 JDK by Adoptium.
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
# Make sure gradle wrapper is executable
- name: Grant execute permission for gradlew
run: chmod +x starbucks-cashier/gradlew
# The "Build with Gradle" step does a build using the gradle/gradle-build-action
# action provided by the Gradle organization on GitHub. The action takes care of
# invoking Gradle, collecting results, and caching state between jobs.
# For more information, See: https://github.com/gradle/gradle-build-action.
- name: Build with Gradle
working-directory: starbucks-cashier
run: ./gradlew build
# List the Build output folder to confirm JAR file was built
- name: Build Result
run: ls build/libs
# Gradle will usually create output files like JARs, EARs, or WARs in the build/libs directory.
# You can upload the contents of that directory using the upload-artifact action.
# See: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.3
with:
name: starbucks-cashier
path: starbucks-cashier/build/libs/starbucks-cashier-1.0.jar