Skip to content

Commit b258861

Browse files
authored
Merge pull request #3506 from 1c-syntax/feature/publishToMavenCentral
настройки публикации в maven central
2 parents bb38ccf + cc03997 commit b258861

File tree

11 files changed

+107
-90
lines changed

11 files changed

+107
-90
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
steps:
2828
- name: Checkout project
2929
uses: actions/checkout@v5
30-
30+
with:
31+
fetch-depth: 0
3132
- name: Setup JDK
3233
uses: actions/setup-java@v5
3334
with:

.github/workflows/check-package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
steps:
3333
- name: Checkout source
3434
uses: actions/checkout@v5
35-
35+
with:
36+
fetch-depth: 0
3637
- name: Set up JDK
3738
uses: actions/setup-java@v5
3839
with:

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
# We must fetch at least the immediate parents so that if this is
2929
# a pull request then we can checkout the head.
30-
fetch-depth: 2
30+
fetch-depth: 0
3131

3232
- name: Set up JDK 17
3333
uses: actions/setup-java@v5

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v5
21-
21+
with:
22+
fetch-depth: 0
2223
- name: Setup JDK
2324
uses: actions/setup-java@v5
2425
with:

.github/workflows/gradle.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
os: [ubuntu-latest, windows-latest, macOS-latest]
2323
steps:
2424
- uses: actions/checkout@v5
25+
with:
26+
fetch-depth: 0
2527
- name: Set up JDK ${{ matrix.java_version }}
2628
uses: actions/setup-java@v5
2729
with:

.github/workflows/javadoc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
2123
- name: Set up JDK
2224
uses: actions/setup-java@v5
2325
with:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to maven central
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- develop
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
with:
17+
fetch-depth: 0
18+
- name: Set up JDK
19+
uses: actions/setup-java@v5
20+
with:
21+
java-version: 17
22+
distribution: 'temurin'
23+
cache: gradle
24+
- name: Deploy to Central Portal
25+
run: |
26+
./gradlew publishMavenPublicationToStagingRepository
27+
./gradlew jreleaserDeploy
28+
env:
29+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31+
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_SIGNING_PUBLIC_KEY }}
33+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SIGNING_KEY }}
34+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSWORD }}
35+
JRELEASER_DEPLOY_MAVEN_NEXUS2_SNAPSHOT_DEPLOY_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
36+
JRELEASER_DEPLOY_MAVEN_NEXUS2_SNAPSHOT_DEPLOY_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/publish-to-sonatype.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
steps:
3030
- name: Checkout source
3131
uses: actions/checkout@v5
32-
32+
with:
33+
fetch-depth: 0
3334
- name: Set up JDK
3435
uses: actions/setup-java@v5
3536
with:

.github/workflows/update-gradle.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v5
14-
14+
with:
15+
fetch-depth: 0
1516
- name: Set up JDK 17
1617
uses: actions/setup-java@v5
1718
with:

0 commit comments

Comments
 (0)