Skip to content

Commit

Permalink
Define basic GitHub Actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Dec 5, 2024
1 parent 898f024 commit ccb5086
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8' ]
architecture: [ 'x64' ]
name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }}
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
cache: 'gradle'

- name: Build with Gradle
run: ./gradlew asciidoc
env:
GITHUB_USER: 'foo'
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ idea {
}
}

githubUser = System.getenv('GITHUB_USER') ?: 'defaultUser'
githubToken = System.getenv('GITHUB_TOKEN') ?: 'defaultToken'

asciidoctor {
sourceDir = file('src/docs/asciidoc')
outputDir = file("$buildDir/docs/asciidoc")
Expand Down

0 comments on commit ccb5086

Please sign in to comment.