Skip to content

Commit

Permalink
Reusable build.yaml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lingbopro committed Feb 2, 2025
1 parent 458c82a commit 208083e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
pull_request:
workflow_dispatch:
workflow_call:
outputs:
artifact-url:
description: URL to the build results artifact
value: ${{ jobs.build.outputs.artifact-url }}

jobs:
build:
Expand All @@ -12,6 +17,8 @@ jobs:
java_version: [ 17 ]
runs-on: ubuntu-latest
name: Build (Java ${{ matrix.java_version }})
outputs:
artifact-url: ${{ steps.upload-artifacts.outputs.artifact-url }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -27,6 +34,7 @@ jobs:
- name: Build
run: ./gradlew build
- name: Upload artifacts
id: upload-artifacts
# if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 208083e

Please sign in to comment.