Skip to content

Commit 3070426

Browse files
committed
rework docs
1 parent 75ce849 commit 3070426

File tree

8 files changed

+120
-1018
lines changed

8 files changed

+120
-1018
lines changed
Lines changed: 48 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,60 @@
1-
name: Publish to Maven
1+
name: Publish to AstroidMC Maven
22

33
on:
44
release:
5-
types: [published]
5+
types: [created]
66
workflow_dispatch:
7-
inputs:
8-
deploy_type:
9-
description: 'Deploy type'
10-
required: true
11-
default: 'snapshot'
12-
type: choice
13-
options:
14-
- snapshot
15-
- release
167

178
jobs:
189
publish:
10+
name: Publish to AstroidMC Maven Repository
1911
runs-on: ubuntu-latest
20-
12+
2113
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Set up JDK 17
26-
uses: actions/setup-java@v4
27-
with:
28-
java-version: '17'
29-
distribution: 'temurin'
30-
cache: maven
31-
32-
- name: Configure Maven settings
33-
uses: whelk-io/maven-settings-xml-action@v21
34-
with:
35-
servers: |
36-
[
37-
{
38-
"id": "astroidmc-releases",
39-
"username": "${{ secrets.MAVEN_USERNAME }}",
40-
"password": "${{ secrets.MAVEN_PASSWORD }}"
41-
},
42-
{
43-
"id": "astroidmc-snapshots",
44-
"username": "${{ secrets.MAVEN_USERNAME }}",
45-
"password": "${{ secrets.MAVEN_PASSWORD }}"
46-
}
47-
]
48-
49-
- name: Update version for release
50-
if: github.event_name == 'release' || github.event.inputs.deploy_type == 'release'
51-
run: |
52-
VERSION=${GITHUB_REF#refs/tags/v}
53-
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
54-
55-
- name: Build and deploy to Maven
56-
run: mvn clean deploy -DskipTests
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- name: Configure Maven settings
25+
run: |
26+
mkdir -p ~/.m2
27+
cat > ~/.m2/settings.xml <<EOF
28+
<settings>
29+
<servers>
30+
<server>
31+
<id>astroidmc-releases</id>
32+
<username>\${env.MAVEN_USERNAME}</username>
33+
<password>\${env.MAVEN_PASSWORD}</password>
34+
</server>
35+
<server>
36+
<id>astroidmc-snapshots</id>
37+
<username>\${env.MAVEN_USERNAME}</username>
38+
<password>\${env.MAVEN_PASSWORD}</password>
39+
</server>
40+
</servers>
41+
</settings>
42+
EOF
43+
44+
- name: Build and Deploy to AstroidMC Maven
45+
run: mvn clean deploy --batch-mode --no-transfer-progress
46+
env:
47+
MAVEN_USERNAME: ${{ secrets.ASTROIDMC_MAVEN_USERNAME }}
48+
MAVEN_PASSWORD: ${{ secrets.ASTROIDMC_MAVEN_PASSWORD }}
49+
50+
- name: Upload Plugin Artifacts
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: plugin-jars
54+
path: |
55+
networkdataapi-paper/target/NetworkDataAPI-Paper-*.jar
56+
networkdataapi-bungee/target/NetworkDataAPI-Bungee-*.jar
57+
retention-days: 30
5758

58-
- name: Publish API documentation
59-
run: mvn javadoc:javadoc javadoc:jar
6059

61-
- name: Deploy Javadoc
62-
if: github.event_name == 'release'
63-
run: mvn deploy -DskipTests -Djavadoc.skip=false
6460

0 commit comments

Comments
 (0)