-
-
Notifications
You must be signed in to change notification settings - Fork 27
44 lines (35 loc) · 1.04 KB
/
publish.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
44
name: Publish Assets
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # for Git to git push
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build app
run: ./mvnw --batch-mode clean deploy
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Publish maven assets
run: |
ls
rsync -r ./*/target/mvn-repo ./target/mvn-repo /tmp/
git checkout --orphan maven || git checkout maven
git reset .
rm -r mvn-repo || true
cp -r /tmp/mvn-repo ./
ls
git add mvn-repo
git commit -a -m "add artifacts"
git push origin maven