Skip to content

Commit 0095ae1

Browse files
committed
add github actions
1 parent f33922c commit 0095ae1

4 files changed

Lines changed: 92 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "22:00"
8+
open-pull-requests-limit: 10
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build & Check
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK 21
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '21'
18+
distribution: 'temurin'
19+
cache: maven
20+
- name: Unshallow
21+
run: git fetch --unshallow --quiet
22+
- name: Build
23+
run: mvn clean package
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
tags: [ "*" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Generate changelog
16+
id: changelog
17+
uses: metcalfc/changelog-generator@v4.6.2
18+
with:
19+
myToken: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Set up JDK 21
22+
uses: actions/setup-java@v4
23+
with:
24+
java-version: '21'
25+
distribution: 'temurin'
26+
cache: maven
27+
server-id: central
28+
server-username: MAVEN_USERNAME
29+
server-password: MAVEN_PASSWORD
30+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
31+
gpg-passphrase: GPG_PASSPHRASE
32+
33+
- name: Build with Maven
34+
run: mvn clean install
35+
36+
- name: Deploy to Central
37+
run: mvn deploy -P central
38+
env:
39+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
40+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
41+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
42+
- name: Generate Javadocs
43+
run: mvn javadoc:aggregate-no-fork
44+
- name: Deploy Javadocs
45+
uses: peaceiris/actions-gh-pages@v4
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./target/reports/apidocs
49+
50+
- name: "Release"
51+
uses: softprops/action-gh-release@v2
52+
with:
53+
body: ${{ steps.changelog.outputs.changelog }}
54+
draft: false
55+
prerelease: false
56+
files: "**/target/*.jar"

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<configuration>
135135
<publishingServerId>central</publishingServerId>
136136
<autoPublish>true</autoPublish>
137-
<deploymentName>UniItem</deploymentName>
137+
<deploymentName>UniDialog</deploymentName>
138138
</configuration>
139139
</plugin>
140140
</plugins>

0 commit comments

Comments
 (0)