Skip to content

Commit e5e93cd

Browse files
added forgejo workflow file x2
???
1 parent 8c38adc commit e5e93cd

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.forgejo/workflows/java-build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: build-java
2+
on: [ push, pull_request ]
3+
4+
jobs:
5+
build:
6+
runs-on: docker
7+
steps:
8+
- name: checkout repository
9+
uses: https://code.forgejo.org/actions/checkout@v4
10+
- name: setup jdk
11+
uses: https://github.com/actions/setup-java@v4
12+
with:
13+
java-version: |
14+
8
15+
21
16+
distribution: temurin
17+
- name: restore cached dependencies
18+
uses: https://code.forgejo.org/actions/cache/restore@v4
19+
with:
20+
path: |
21+
~/.gradle/caches
22+
~/.gradle/wrapper
23+
key: ${{ runner.os }}-Gradle
24+
- name: build
25+
run: ./gradlew build --no-daemon --warning-mode=all
26+
- name: capture build artifacts
27+
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
28+
with:
29+
name: build-artifacts.zip
30+
path: |
31+
build/libs
32+
!build/libs/*-all.jar
33+
if-no-files-found: error
34+
- name: cache downloaded dependencies
35+
if: ${{ github.ref_name == github.event.repository.default_branch }}
36+
uses: https://code.forgejo.org/actions/cache/save@v4
37+
with:
38+
path: |
39+
~/.gradle/caches
40+
~/.gradle/wrapper
41+
key: ${{ runner.os }}-Gradle

0 commit comments

Comments
 (0)