Skip to content

Commit 20fb53d

Browse files
committed
fix: maven central publishing
1 parent d5384a5 commit 20fb53d

File tree

7 files changed

+177
-177
lines changed

7 files changed

+177
-177
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ insert_final_newline = true
88
indent_style = space
99
indent_size = 4
1010

11-
[gradlew]
12-
end_of_line = lf
11+
[*.{yml,yaml}]
12+
indent_size = 2

.github/workflows/build-prs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build project (in pr)
22

33
on:
4-
pull_request: {}
4+
pull_request: { }
55

66
jobs:
77
build:
@@ -10,12 +10,12 @@ jobs:
1010
group: ${{ github.ref }}
1111
cancel-in-progress: true
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
with:
1515
path: './'
1616
fetch-depth: 0
1717
- name: Set up JDK 21
18-
uses: actions/setup-java@v4
18+
uses: actions/setup-java@v5
1919
with:
2020
java-version: 21
2121
distribution: zulu

.github/workflows/build.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
name: Publish + build
22
on:
3-
push:
4-
branches: [ '**' ]
5-
paths-ignore: [ '**.md' ]
6-
workflow_call:
7-
secrets:
8-
MAVEN_USERNAME:
9-
required: false
10-
MAVEN_PASSWORD:
11-
required: false
12-
MAVEN_CENTRAL_PASSWORD:
13-
required: false
14-
MAVEN_CENTRAL_USERNAME:
15-
required: false
16-
SIGNING_IN_MEMORY_KEY:
17-
required: false
18-
SIGNING_IN_MEMORY_KEY_PASSWORD:
19-
required: false
3+
push:
4+
branches: [ '**' ]
5+
paths-ignore: [ '**.md' ]
6+
workflow_call:
7+
secrets:
8+
MAVEN_USERNAME:
9+
required: false
10+
MAVEN_PASSWORD:
11+
required: false
12+
MAVEN_CENTRAL_PASSWORD:
13+
required: false
14+
MAVEN_CENTRAL_USERNAME:
15+
required: false
16+
SIGNING_IN_MEMORY_KEY:
17+
required: false
18+
SIGNING_IN_MEMORY_KEY_PASSWORD:
19+
required: false
2020

2121
jobs:
22-
build:
23-
runs-on: ubuntu-latest
24-
env:
25-
ORG_GRADLE_PROJECT_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
26-
ORG_GRADLE_PROJECT_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
27-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
28-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
29-
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
30-
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
with:
35-
fetch-depth: 0
22+
build:
23+
runs-on: ubuntu-latest
24+
env:
25+
ORG_GRADLE_PROJECT_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
26+
ORG_GRADLE_PROJECT_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
27+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
28+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
29+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
30+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v6
34+
with:
35+
fetch-depth: 0
3636

37-
- name: Setup Java
38-
uses: actions/setup-java@v4
39-
with:
40-
distribution: zulu
41-
java-version: 21
42-
cache: gradle
37+
- name: Setup Java
38+
uses: actions/setup-java@v5
39+
with:
40+
distribution: zulu
41+
java-version: 21
42+
cache: gradle
4343

44-
- name: Setup Gradle
45-
uses: gradle/gradle-build-action@v2
44+
- name: Setup Gradle
45+
uses: gradle/gradle-build-action@v3
4646

47-
- name: Build and Publish
48-
run: ./gradlew build publish --no-daemon -x test
47+
- name: Build and Publish
48+
run: ./gradlew build publish --no-daemon -x test
4949

50-
- name: Upload Artifacts
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: Lavalink-Client.zip
54-
path: |
55-
build/libs/lavalink-client-*.jar
50+
- name: Upload Artifacts
51+
uses: actions/upload-artifact@v5
52+
with:
53+
name: Lavalink-Client.zip
54+
path: |
55+
build/libs/lavalink-client-*.jar

.github/workflows/docs-branch.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
name: Docs Branch
22

33
on:
4-
push:
5-
branches: [ '**' ]
6-
paths:
7-
- 'dokka/**'
8-
- 'src/main/**'
9-
- '.github/workflows/docs-branch.yml'
4+
push:
5+
branches: [ '**' ]
6+
paths:
7+
- 'dokka/**'
8+
- 'src/main/**'
9+
- '.github/workflows/docs-branch.yml'
1010

1111
concurrency:
12-
group: pages-${{ github.ref_name }}
13-
cancel-in-progress: true
12+
group: pages-${{ github.ref_name }}
13+
cancel-in-progress: true
1414

1515
jobs:
16-
deploy:
17-
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
20-
deployments: write
21-
steps:
22-
- uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
- uses: actions/setup-java@v4
26-
with:
27-
java-version: 21
28-
distribution: zulu
29-
cache: gradle
30-
- name: Build docs
31-
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
32-
- name: Copy javadoc subfolder
33-
run: mv build/dokka/javadoc build/dokka/html/ && cp dokka/includes/404.html build/dokka/html/
34-
- uses: actions/upload-pages-artifact@v3
35-
with:
36-
path: 'build/dokka/html'
37-
- uses: cloudflare/wrangler-action@v3
38-
with:
39-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
40-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41-
command: pages deploy "build/dokka/html" --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}" --branch="${{ github.ref_name }}"
42-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
16+
deploy:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
deployments: write
21+
steps:
22+
- uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 0
25+
- uses: actions/setup-java@v5
26+
with:
27+
java-version: 21
28+
distribution: zulu
29+
cache: gradle
30+
- name: Build docs
31+
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
32+
- name: Copy javadoc subfolder
33+
run: mv build/dokka/javadoc build/dokka/html/ && cp dokka/includes/404.html build/dokka/html/
34+
- uses: actions/upload-pages-artifact@v4
35+
with:
36+
path: 'build/dokka/html'
37+
- uses: cloudflare/wrangler-action@v3
38+
with:
39+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
40+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41+
command: pages deploy "build/dokka/html" --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}" --branch="${{ github.ref_name }}"
42+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs-pr.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
name: Docs PR
22

33
on:
4-
pull_request_target:
5-
branches: [ '**' ]
6-
paths:
7-
- 'dokka/**'
8-
- 'src/main/**'
9-
- '.github/workflows/docs-pr.yml'
4+
pull_request_target:
5+
branches: [ '**' ]
6+
paths:
7+
- 'dokka/**'
8+
- 'src/main/**'
9+
- '.github/workflows/docs-pr.yml'
1010

1111
concurrency:
12-
group: pages
13-
cancel-in-progress: true
12+
group: pages
13+
cancel-in-progress: true
1414

1515
jobs:
16-
deploy:
17-
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
20-
deployments: write
21-
steps:
22-
- uses: actions/checkout@v4
23-
with:
24-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
25-
fetch-depth: 0
26-
- uses: actions/setup-java@v4
27-
with:
28-
java-version: 21
29-
distribution: zulu
30-
cache: gradle
31-
- name: Build docs
32-
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
33-
- name: Copy javadoc subfolder
34-
run: mv build/dokka/javadoc build/dokka/html/ && cp dokka/includes/404.html build/dokka/html/
35-
- uses: actions/upload-pages-artifact@v3
36-
with:
37-
path: 'build/dokka/html'
38-
- uses: cloudflare/wrangler-action@v3
39-
with:
40-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42-
command: pages deploy "build/dokka/html" --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}" --branch="pr-${{ github.event.pull_request.number }}"
43-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
16+
deploy:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
deployments: write
21+
steps:
22+
- uses: actions/checkout@v6
23+
with:
24+
ref: "${{ github.event.pull_request.merge_commit_sha }}"
25+
fetch-depth: 0
26+
- uses: actions/setup-java@v5
27+
with:
28+
java-version: 21
29+
distribution: zulu
30+
cache: gradle
31+
- name: Build docs
32+
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
33+
- name: Copy javadoc subfolder
34+
run: mv build/dokka/javadoc build/dokka/html/ && cp dokka/includes/404.html build/dokka/html/
35+
- uses: actions/upload-pages-artifact@v4
36+
with:
37+
path: 'build/dokka/html'
38+
- uses: cloudflare/wrangler-action@v3
39+
with:
40+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42+
command: pages deploy "build/dokka/html" --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}" --branch="pr-${{ github.event.pull_request.number }}"
43+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
name: Docs Release
22

33
on:
4-
release:
5-
types: [ published ]
6-
workflow_dispatch: {}
4+
release:
5+
types: [ published ]
6+
workflow_dispatch: { }
77

88
concurrency:
9-
group: pages-${{ github.ref }}
10-
cancel-in-progress: true
9+
group: pages-${{ github.ref }}
10+
cancel-in-progress: true
1111

1212
jobs:
13-
deploy:
14-
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
deployments: write
18-
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
fetch-depth: 0
22-
- uses: actions/setup-java@v4
23-
with:
24-
java-version: 21
25-
distribution: zulu
26-
cache: gradle
27-
- name: Build docs
28-
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
29-
- name: Copy javadoc subfolder
30-
run: mv build/dokka/javadoc build/dokka/html/ && cp dokka/includes/404.html build/dokka/html/
31-
- uses: actions/upload-pages-artifact@v3
32-
with:
33-
path: 'build/dokka/html'
34-
- uses: cloudflare/wrangler-action@v3
35-
with:
36-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
37-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38-
command: pages deploy "build/dokka/html" --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}"
39-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
13+
deploy:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
deployments: write
18+
steps:
19+
- uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-java@v5
23+
with:
24+
java-version: 21
25+
distribution: zulu
26+
cache: gradle
27+
- name: Build docs
28+
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
29+
- name: Copy javadoc subfolder
30+
run: mv build/dokka/javadoc build/dokka/html/ && cp dokka/includes/404.html build/dokka/html/
31+
- uses: actions/upload-pages-artifact@v4
32+
with:
33+
path: 'build/dokka/html'
34+
- uses: cloudflare/wrangler-action@v3
35+
with:
36+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
37+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38+
command: pages deploy "build/dokka/html" --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}"
39+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)