-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.14 KB
/
gradle-plugin.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
name: gradle-based jvm libraries
on:
workflow_call:
secrets:
GRADLE_PLUGIN_PUBLISH_KEY:
required: true
GRADLE_PLUGIN_PUBLISH_SECRET:
required: true
jobs:
build:
if: "!contains(github.event.commits[0].message, 'release-')"
runs-on: ubuntu-22.04
environment: ci
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@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: run tests
run: |
./gradlew test
- name: increment project version
run: |
./gradlew release-paperwork
git push
- name: build new version
run: ./gradlew build -x test
- name: publish to the plugins repo
run: |
echo "gradle.publish.key=${{ secrets.GRADLE_PLUGIN_PUBLISH_KEY }}" >> ./gradle.properties
echo "gradle.publish.secret=${{ secrets.GRADLE_PLUGIN_PUBLISH_SECRET }}" >> ./gradle.properties
./gradlew publishPlugins