-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (37 loc) · 1.16 KB
/
gradle-ci.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
name: Gradle CI
on:
push:
branches:
- '**'
pull_request:
permissions:
contents: read
jobs:
build:
name: Gradle build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
arguments: build
- id: build_info
name: Get build info
run: |
echo "repository_name=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_OUTPUT
echo "sha_short=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
shell: bash
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build_info.outputs.repository_name }}-build-artifacts-${{ steps.build_info.outputs.sha_short }}
path: build/libs/