-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (33 loc) · 1.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
# pull_request:
push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- name: Test
run: mvn test
- name: Build with Maven
run: |
mvn -B -P github package -file pom.xml
cat $GITHUB_WORKSPACE/settings.xml
# mkdir staging && cp target/*.jar staging
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }}
GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }}
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: Package
path: staging