From 4e2d08278f0e78e4479cbbdd5ee09fdf9b15ee9e Mon Sep 17 00:00:00 2001 From: Christopher Schnick Date: Fri, 12 Aug 2022 17:51:28 +0200 Subject: [PATCH] Release fixes --- .github/workflows/api-build.yml | 31 --------------- .github/workflows/api-publish.yml | 28 -------------- .../workflows/{core-build.yml => build.yml} | 4 +- .github/workflows/publish.yml | 38 +++++++++++++++++++ 4 files changed, 40 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/api-build.yml delete mode 100644 .github/workflows/api-publish.yml rename .github/workflows/{core-build.yml => build.yml} (90%) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/api-build.yml b/.github/workflows/api-build.yml deleted file mode 100644 index 306fda10a..000000000 --- a/.github/workflows/api-build.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: API Build - -on: [] - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ - ubuntu-20.04, - # macos-10.15, - windows-2022 - ] - fail-fast: false - name: ${{ matrix.os }} - steps: - - name: Git checkout - uses: actions/checkout@v2 - - - name: Set up GraalVM - uses: graalvm/setup-graalvm@v1 - with: - version: '21.3.0' - java-version: '17' - - - name: Verify Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 - - - name: Execute build - run: ./gradlew :api:clean :api:build diff --git a/.github/workflows/api-publish.yml b/.github/workflows/api-publish.yml deleted file mode 100644 index 43c48fc01..000000000 --- a/.github/workflows/api-publish.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: API Publish - -on: [] - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: Git checkout - uses: actions/checkout@v2 - - - name: Set up GraalVM - uses: graalvm/setup-graalvm@v1 - with: - version: '21.3.0' - java-version: '17' - - - name: Verify Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 - - - name: Execute build - run: ./gradlew :api:clean :api:build - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: api - path: build/libs diff --git a/.github/workflows/core-build.yml b/.github/workflows/build.yml similarity index 90% rename from .github/workflows/core-build.yml rename to .github/workflows/build.yml index 6ee97cc00..ae190104d 100644 --- a/.github/workflows/core-build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Core Build +name: Build on: [push, pull_request] @@ -30,4 +30,4 @@ jobs: uses: gradle/wrapper-validation-action@v1 - name: Execute build - run: ./gradlew :core:clean :core:build + run: ./gradlew clean build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..c47806fa4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Git checkout + uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 + with: + version: '21.3.0' + java-version: '17' + + - name: Verify Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Publish + run: ./gradlew publish + env: + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_KEY: ${{ secrets.GPG_KEY }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + + - name: JReleaser + run: ./gradlew jreleaserRelease jreleaserAnnounce + env: + JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }} + JRELEASER_DISCORD_WEBHOOK: ${{ secrets.JRELEASER_DISCORD_WEBHOOK }}