Skip to content

Commit 625b8ea

Browse files
committed
ci: configure GitHub Actions to package code
Packaging code includes testing code. Code will be packaged when for pull request to `main` and commits on `main`. This should ensure fully working code on `main`.
1 parent 8703063 commit 625b8ea

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/package.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Package Code
10+
11+
on:
12+
push:
13+
branches: [ "main" ]
14+
pull_request:
15+
branches: [ "main" ]
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK 21
25+
uses: actions/setup-java@v4
26+
with:
27+
# Compile source and target are still specified in pom.xml
28+
java-version: '21'
29+
distribution: 'temurin'
30+
cache: maven
31+
- name: Build with Maven
32+
run: mvn --batch-mode package
33+
34+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
35+
- name: Update dependency graph
36+
uses: advanced-security/maven-dependency-submission-action@v4

0 commit comments

Comments
 (0)