Merge projects #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
release: | |
types: [ published ] | |
concurrency: | |
# Maximum of one running workflow per pull request on source branches. | |
# Cancel an old run if an action is re-run. | |
group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: "Build with Gradle" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "8" | |
distribution: "temurin" | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Set gradlew permissions | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --no-daemon | |
- name: Upload Build Output | |
uses: actions/upload-artifact@v4 | |
with: | |
name: weaveloader-artifacts | |
path: | | |
api/build/libs/ | |
loader/build/libs/ | |
internals/build/libs/ | |
gradle-plugin/build/libs/ | |
- name: Create release | |
if: github.event_name == 'release' | |
working-directory: loader/build/libs | |
run: | | |
agent=weave-loader-${{github.event.release.name}}-all.jar | |
sha256sum $agent > $agent.sha256 | |
gh release upload ${{github.ref_name}} $agent $agent.sha256 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |