-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.13 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Kotlin CI with Gradle
on:
pull_request:
push:
branches:
- '*'
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Build with Gradle Wrapper
run: ./gradlew build
env:
GH_USER: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish distribution
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew publish
env:
GH_USER: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REF: ${{ github.ref }}
- name: Publish container images
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew jib
env:
GH_USER: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}