From 49e3f34232a194281a864622b3df8738cac6b858 Mon Sep 17 00:00:00 2001 From: nshtengauer Date: Sat, 7 Dec 2024 20:20:43 +0300 Subject: [PATCH] GitHub Actions fixes --- .github/workflows/compilation.yml | 61 ------------------------ .github/workflows/maven_publish.yml | 64 ++++++++++++++++++++++++++ .github/workflows/maven_publishing.yml | 22 --------- 3 files changed, 64 insertions(+), 83 deletions(-) delete mode 100644 .github/workflows/compilation.yml create mode 100644 .github/workflows/maven_publish.yml delete mode 100644 .github/workflows/maven_publishing.yml diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml deleted file mode 100644 index 100bddf..0000000 --- a/.github/workflows/compilation.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Native compilation - -on: - workflow_dispatch: - -jobs: - compile-linux: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - - name: "Install Mesa" - run: | - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install mesa-common-dev:amd64 mesa-common-dev:i386 - - - name: "Install GCC multilib" - run: sudo apt-get install gcc-multilib g++-multilib - - - name: "Compile" - run: | - chmod +x ./gradlew - ./gradlew compile - - - name: "Upload libraries" - uses: actions/upload-artifact@v2 - with: - name: Linux - path: ./modules/native/build/lib - - compile-windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - - name: "Compile" - run: | - ./gradlew compile - - - name: "Upload libraries" - uses: actions/upload-artifact@v2 - with: - name: Windows - path: ./modules/native/lib - - compile-macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - name: "Compile" - run: | - chmod +x ./gradlew - ./gradlew compile - - - name: "Upload libraries" - uses: actions/upload-artifact@v2 - with: - name: MacOS - path: ./modules/native/build/lib diff --git a/.github/workflows/maven_publish.yml b/.github/workflows/maven_publish.yml new file mode 100644 index 0000000..9428b8e --- /dev/null +++ b/.github/workflows/maven_publish.yml @@ -0,0 +1,64 @@ +name: Maven Central publishing + +on: + workflow_dispatch: + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: "Importing GPG key" + run: | + sudo gpg --batch --passphrase ${{ secrets.GPG_PASSPHRASE }} --import gradle/secring.gpg + + - name: "Prepare" + run: | + chmod +x ./gradlew + + - name: "Building and publishing" + run: > + ./gradlew publish + -Dorg.gradle.project.signing.password=${{ secrets.GPG_PASSPHRASE }} + -Dorg.gradle.project.signing.secretKeyRingFile=${{ github.workspace }}/gradle/secring.gpg + -Dorg.gradle.project.ossrhUsername=${{ secrets.SONATYPE_USERNAME }} + -Dorg.gradle.project.ossrhPassword=${{ secrets.SONATYPE_PASSWORD }} + + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: "Importing GPG key" + run: | + gpg --batch --passphrase ${{ secrets.GPG_PASSPHRASE }} --import gradle/secring.gpg + + - name: "Building and publishing" + run: > + ./gradlew publishNatives + "-Dorg.gradle.project.signing.password=${{ secrets.GPG_PASSPHRASE }}" + "-Dorg.gradle.project.signing.secretKeyRingFile=${{ github.workspace }}/gradle/secring.gpg" + "-Dorg.gradle.project.ossrhUsername=${{ secrets.SONATYPE_USERNAME }}" + "-Dorg.gradle.project.ossrhPassword=${{ secrets.SONATYPE_PASSWORD }}" + + macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: "Importing GPG key" + run: | + gpg --batch --passphrase ${{ secrets.GPG_PASSPHRASE }} --import gradle/secring.gpg + + - name: "Prepare" + run: | + chmod +x ./gradlew + + - name: "Building and publishing" + run: > + ./gradlew publishNatives + -Dorg.gradle.project.signing.password=${{ secrets.GPG_PASSPHRASE }} + -Dorg.gradle.project.signing.secretKeyRingFile=${{ github.workspace }}/gradle/secring.gpg + -Dorg.gradle.project.ossrhUsername=${{ secrets.SONATYPE_USERNAME }} + -Dorg.gradle.project.ossrhPassword=${{ secrets.SONATYPE_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/maven_publishing.yml b/.github/workflows/maven_publishing.yml deleted file mode 100644 index 45c5ece..0000000 --- a/.github/workflows/maven_publishing.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Maven Central publishing - -on: - workflow_dispatch: - -jobs: - publishing: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: "Importing GPG key" - run: | - sudo echo ${{ secrets.GPG_PASSPHRASE }} | gpg --batch --yes --passphrase-fd 0 secring.gpg - - - name: "Publishing" - env: - ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.SONATYPE_PASSWORD }} - run: | - chmod +x ./gradlew - ./gradlew publish closeAndReleaseRepository -Dorg.gradle.project.signing.password=${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file