-
Notifications
You must be signed in to change notification settings - Fork 27
52 lines (50 loc) · 1.49 KB
/
build-jlink-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
45
46
47
48
49
50
51
52
name: CI
on: [push, pull_request]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Gradle build
uses: gradle/gradle-build-action@v3
with:
arguments: build asciidoc --scan
- name: Run publish if necessary
if: runner.os == 'Linux' && github.ref == 'refs/heads/master' && github.event_name == 'push'
env:
GRGIT_USER: ${{ secrets.GRGIT_USER }}
run: chmod +x publish.sh && ./publish.sh
- uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
path: build/libs/*
release:
name: Publish to the Gradle Plugin Portal
runs-on: ubuntu-latest
needs: build
if: "startsWith(github.event.head_commit.message, 'Release ')"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Publish Gradle Plugins
uses: gradle/gradle-build-action@v3
with:
arguments: |
assemble
publishPlugins
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}