Skip to content

Commit 2004b6b

Browse files
committed
dev: Add Github Workflows
1 parent d0b5621 commit 2004b6b

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Build Java
9+
10+
on:
11+
push:
12+
branches: [ "main" ]
13+
pull_request:
14+
branches: [ "main" ]
15+
workflow_dispatch:
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-22.04
21+
permissions:
22+
contents: read
23+
24+
steps:
25+
- name: Checkout sources
26+
uses: actions/checkout@v6
27+
28+
- name: Set up Java
29+
uses: actions/setup-java@v5
30+
with:
31+
java-version: '21'
32+
distribution: 'temurin'
33+
34+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
35+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
36+
- name: Setup Gradle
37+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
38+
39+
- name: Build with Gradle Wrapper
40+
run: ./gradlew build
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Dependency Submission
9+
10+
on:
11+
push:
12+
branches: [ "main" ]
13+
workflow_dispatch:
14+
15+
jobs:
16+
dependency-submission:
17+
runs-on: ubuntu-22.04
18+
permissions:
19+
contents: write
20+
21+
steps:
22+
- name: Checkout sources
23+
uses: actions/checkout@v6
24+
25+
- name: Set up Java
26+
uses: actions/setup-java@v5
27+
with:
28+
java-version: '21'
29+
distribution: 'temurin'
30+
31+
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
32+
- name: Generate and submit dependency graph
33+
uses: gradle/actions/dependency-submission@v6

0 commit comments

Comments
 (0)