mirror of
https://github.com/JonasunderscoreJones/McWebserver.git
synced 2025-10-22 10:59:18 +02:00
added forgejo workflows file
All checks were successful
build-java / build (push) Successful in 1m40s
All checks were successful
build-java / build (push) Successful in 1m40s
This commit is contained in:
parent
eb40cc49b8
commit
3dc95d063b
1 changed files with 41 additions and 0 deletions
41
.forgejo/workflows/java-build.yml
Normal file
41
.forgejo/workflows/java-build.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: build-java
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
- name: setup jdk
|
||||
uses: https://github.com/actions/setup-java@v4
|
||||
with:
|
||||
java-version: |
|
||||
8
|
||||
21
|
||||
distribution: temurin
|
||||
- name: restore cached dependencies
|
||||
uses: https://code.forgejo.org/actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-Gradle
|
||||
- name: build
|
||||
run: ./gradlew build --no-daemon --warning-mode=all
|
||||
- name: capture build artifacts
|
||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: build-artifacts.zip
|
||||
path: |
|
||||
build/libs
|
||||
!build/libs/*-all.jar
|
||||
if-no-files-found: error
|
||||
- name: cache downloaded dependencies
|
||||
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
||||
uses: https://code.forgejo.org/actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-Gradle
|
Loading…
Add table
Add a link
Reference in a new issue