Skip to content

Commit 340c8bd

Browse files
author
eschleb
committed
initial commit
0 parents  commit 340c8bd

32 files changed

+2496
-0
lines changed

.github/actions/mvn-setup/action.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Setup maven"
2+
description: "Configures maven settings"
3+
4+
inputs:
5+
mgnl_nexus_user:
6+
description: “Username for magnolia nexus”
7+
required: true
8+
mgnl_nexus_pass:
9+
description: “Password for magnolia nexus”
10+
required: true
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- uses: s4u/maven-settings-action@v2
16+
with:
17+
servers: |
18+
[{
19+
"id": "magnolia.enterprise.group",
20+
"username": "${{ inputs.mgnl_nexus_user }}",
21+
"password": "${{ inputs.mgnl_nexus_pass }}"
22+
}]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: release and deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout source code
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: '0'
19+
# Setup Java environment
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: 17
24+
- name: Maven setup
25+
uses: ./.github/actions/mvn-setup
26+
with:
27+
mgnl_nexus_user: ${{secrets.MGNL_NEXUS_USER}}
28+
mgnl_nexus_pass: ${{secrets.MGNL_NEXUS_PASS}}
29+
# Install xmllint
30+
- name: Install dependencies
31+
run: sudo apt-get update && sudo apt-get install libxml2-utils
32+
# Set git user name and email
33+
- name: Set up Git
34+
run: |
35+
chmod +x ci/setup-git.sh
36+
ci/setup-git.sh
37+
# Release, set correct versions and create tag
38+
- name: Release (versioning/tag)
39+
run: |
40+
chmod +x ci/mvn-release.sh
41+
ci/mvn-release.sh
42+
43+
deploy-release:
44+
45+
needs: release
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
# Checkout source code
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
with:
53+
ref: 'main'
54+
# Setup Java environment
55+
- name: Set up JDK 17
56+
uses: actions/setup-java@v4
57+
with:
58+
distribution: temurin
59+
java-version: 17
60+
server-id: central
61+
server-username: MAVEN_USERNAME
62+
server-password: MAVEN_PASSWORD
63+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
64+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
65+
- name: Maven setup
66+
uses: ./.github/actions/mvn-setup
67+
with:
68+
mgnl_nexus_user: ${{secrets.MGNL_NEXUS_USER}}
69+
mgnl_nexus_pass: ${{secrets.MGNL_NEXUS_PASS}}
70+
# Run maven verify
71+
- name: Maven verify
72+
run: mvn verify --batch-mode
73+
# Publish
74+
- name: Release Maven package (SNAPSHOT)
75+
run: mvn deploy -Pdeploy
76+
env:
77+
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER }}
78+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
79+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

.github/workflows/verify.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: verify
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
8+
jobs:
9+
verify:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout source code
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
# Setup Java environment
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: temurin
22+
java-version: 17
23+
- name: Maven setup
24+
uses: ./.github/actions/mvn-setup
25+
with:
26+
mgnl_nexus_user: ${{secrets.MGNL_NEXUS_USER}}
27+
mgnl_nexus_pass: ${{secrets.MGNL_NEXUS_PASS}}
28+
# Run maven verify
29+
- name: Maven verify
30+
run: mvn verify --batch-mode

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# OS
2+
.DS_Store
3+
Thumbs.db
4+
5+
target
6+
7+
.idea
8+
*.iml
9+
10+
#JRebel
11+
rebel.xml
12+
codesigning.asc

0 commit comments

Comments
 (0)