Skip to content

do not use gradle toolchain (incompatible with latest Windows on ARM) #7

do not use gradle toolchain (incompatible with latest Windows on ARM)

do not use gradle toolchain (incompatible with latest Windows on ARM) #7

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 }}