diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e8eed06..707e741 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,18 +5,18 @@ name: CI
on:
push:
- branches: [ main ]
+ branches: [main]
pull_request:
- branches: [ main ]
+ branches: [main]
workflow_dispatch:
-concurrency:
+concurrency:
group: mailosaur-java
cancel-in-progress: true
jobs:
build:
- runs-on: ubuntu-latest
+ runs-on: ${{ vars.LINUX }}
timeout-minutes: 10
env:
@@ -29,27 +29,27 @@ jobs:
MAILOSAUR_PREVIEWS_SERVER: ${{ secrets.MAILOSAUR_PREVIEWS_SERVER }}
steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v3
- with:
- java-version: '8.0.332+9'
- distribution: temurin
- - name: Build with Maven
- run: mvn -B package --file pom.xml
- - name: Notify on Failure
- uses: skitionek/notify-microsoft-teams@master
- if: ${{ failure() }}
- with:
- webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }}
- needs: ${{ toJson(needs) }}
- job: ${{ toJson(job) }}
- overwrite: "{ title: `${workflow} failed for ${repository.name}` }"
+ - uses: actions/checkout@v2
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ vars.JAVA_VERSION }}
+ distribution: temurin
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+ - name: Notify on Failure
+ uses: skitionek/notify-microsoft-teams@master
+ if: ${{ failure() }}
+ with:
+ webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }}
+ needs: ${{ toJson(needs) }}
+ job: ${{ toJson(job) }}
+ overwrite: "{ title: `${workflow} failed for ${repository.name}` }"
build-next:
if: ${{ always() }}
needs: build
- runs-on: ubuntu-latest
+ runs-on: ${{ vars.LINUX }}
timeout-minutes: 10
env:
@@ -62,19 +62,19 @@ jobs:
MAILOSAUR_PREVIEWS_SERVER: ${{ secrets.MAILOSAUR_PREVIEWS_SERVER }}
steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v3
- with:
- java-version: '8.0.332+9'
- distribution: temurin
- - name: Build with Maven
- run: mvn -B package --file pom.xml
- - name: Notify on Failure
- uses: skitionek/notify-microsoft-teams@master
- if: ${{ failure() }}
- with:
- webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }}
- needs: ${{ toJson(needs) }}
- job: ${{ toJson(job) }}
- overwrite: "{ title: `${workflow} failed for ${repository.name}` }"
+ - uses: actions/checkout@v2
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ vars.JAVA_VERSION }}
+ distribution: temurin
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+ - name: Notify on Failure
+ uses: skitionek/notify-microsoft-teams@master
+ if: ${{ failure() }}
+ with:
+ webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }}
+ needs: ${{ toJson(needs) }}
+ job: ${{ toJson(job) }}
+ overwrite: "{ title: `${workflow} failed for ${repository.name}` }"
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 4b76d6d..3579c6d 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -6,7 +6,7 @@ on:
jobs:
publish:
- runs-on: ubuntu-latest
+ runs-on: ${{ vars.LINUX }}
timeout-minutes: 10
env:
@@ -21,13 +21,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Java
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
- java-version: '17'
+ java-version: ${{ vars.JAVA_VERSION }}
distribution: temurin
server-id: ossrh
- server-username: MAVEN_USERNAME # env variable for username in deploy
- server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
+ server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
+ server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Version
@@ -39,8 +39,6 @@ jobs:
run: |
mvn --batch-mode deploy
env:
- MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
- MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Notify on Failure
uses: skitionek/notify-microsoft-teams@master
diff --git a/pom.xml b/pom.xml
index fd3e3b0..eb1900b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,27 +130,14 @@
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.6.13
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.6.0
true
- ossrh
- https://oss.sonatype.org/
- true
+ central
-
-
-
- ossrh
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- ossrh
- https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-