From adf9d5fe4e1240de7f89f5b2b50f0d6d62de1d7e Mon Sep 17 00:00:00 2001 From: SpaiR Date: Fri, 17 Dec 2021 22:49:36 +0300 Subject: [PATCH] [Build] Update publish scripts --- .github/workflows/publish_to_maven.yml | 46 ++++++-------------------- buildSrc/scripts/release.sh | 17 ++++++++++ 2 files changed, 27 insertions(+), 36 deletions(-) create mode 100644 buildSrc/scripts/release.sh diff --git a/.github/workflows/publish_to_maven.yml b/.github/workflows/publish_to_maven.yml index bc5ba8b..4fa5ed0 100644 --- a/.github/workflows/publish_to_maven.yml +++ b/.github/workflows/publish_to_maven.yml @@ -1,11 +1,8 @@ name: Publish to Maven on: workflow_dispatch jobs: - publish-modules: - strategy: - matrix: - module: [imgui-app, imgui-lwjgl3, imgui-binding] - name: Publish Module (${{ matrix.module }}) + publish-to-maven: + name: Publish to Maven runs-on: ubuntu-latest env: NEXUS_UPD_ID: ${{ secrets.RELEASE_NEXUS_UPD_ID }} @@ -15,39 +12,16 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + + - name: Set up Repository + run: | + chmod +x ./buildSrc/scripts/release.sh + chmod +x ./gradlew - name: Set up Java 8 uses: actions/setup-java@v1 with: java-version: 8 - - - name: Publish - uses: eskatos/gradle-command-action@v1 - with: - arguments: ${{ format(':{0}:publishMavenJavaPublicationToMavenCentralRepository', matrix.module) }} - - publish-natives: - strategy: - matrix: - type: [win, linux, mac] - freetype: [true, false] - name: Publish Native (type=${{ matrix.type }}, freetype=${{ matrix.freetype }}) - runs-on: ubuntu-latest - env: - NEXUS_UPD_ID: ${{ secrets.RELEASE_NEXUS_UPD_ID }} - NEXUS_UPD_PASS: ${{ secrets.RELEASE_NEXUS_UPD_PASS }} - SIGNING_KEY_ID: ${{ secrets.RELEASE_SIGNING_KEY_ID }} - SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }} - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Java 8 - uses: actions/setup-java@v1 - with: - java-version: 8 - - - name: Publish - uses: eskatos/gradle-command-action@v1 - with: - arguments: ${{ format(':imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType={0} -Pfreetype={1}', matrix.type, matrix.freetype) }} + + - name: Release + run: ./buildSrc/scripts/release.sh diff --git a/buildSrc/scripts/release.sh b/buildSrc/scripts/release.sh new file mode 100644 index 0000000..d0290b2 --- /dev/null +++ b/buildSrc/scripts/release.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +BASEDIR=$(dirname "$0") +cd $BASEDIR/../.. || exit + +echo [Publishing Modules...] +./gradlew :imgui-app:publishMavenJavaPublicationToMavenCentralRepository +./gradlew :imgui-lwjgl3:publishMavenJavaPublicationToMavenCentralRepository +./gradlew :imgui-binding:publishMavenJavaPublicationToMavenCentralRepository + +echo [Publishing Native...] +./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=win -Pfreetype=true +./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=win -Pfreetype=false +./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=true +./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=false +./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=mac -Pfreetype=true +./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=mac -Pfreetype=false