diff --git a/.github/workflows/publish-macos.yaml b/.github/workflows/publish-macos.yaml deleted file mode 100644 index 3a2ea294..00000000 --- a/.github/workflows/publish-macos.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Publish package to the Maven Central Repository -on: - release: - types: [created] - workflow_dispatch: -jobs: - publish-macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Java - uses: actions/setup-java@v1 - with: - java-version: 11 - - id: install-secret-key - name: Install gpg secret key - run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - - - name: Pre-build - run: gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' - - - name: Publish package - run: gradle publishNativePublicationToOSSRHRepository -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} -# publish-windows: -# runs-on: windows-latest -# steps: -# - uses: actions/checkout@v2 -# - name: Set up Java -# uses: actions/setup-java@v1 -# with: -# java-version: 11 -# - id: install-secret-key -# name: Install gpg secret key -# run: | -# echo -n "$GPG_SIGNING_KEY" | gpg --batch --import -# gpg --list-secret-keys --keyid-format LONG -# -# - name: Install local versions (gradle) -# run: gradle -Pplugin_version='0.4.2' ksrpc-gradle-plugin:publishToMavenLocal -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' -# -# - name: Install local versions (plugin) -# run: gradle -Pplugin_version='0.4.2' ksrpc-compiler-plugin:publishToMavenLocal -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' -# -# - name: Install local versions (plugin native) -# run: gradle -Pplugin_version='0.4.2' ksrpc-compiler-plugin-native:publishToMavenLocal -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' -# -# - name: Pre-build -# run: gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' -# -# - name: Publish package -# run: gradle publish -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' -# env: -# GPG_SIGNING_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY}} -# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} -# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} diff --git a/.github/workflows/publish-windows.yaml b/.github/workflows/publish-windows.yaml deleted file mode 100644 index cd97e3c6..00000000 --- a/.github/workflows/publish-windows.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: (Windows) Publish package to the Maven Central Repository -on: - release: - types: [created] - workflow_dispatch: -jobs: - publish: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Java - uses: actions/setup-java@v1 - with: - java-version: 11 - - id: install-secret-key - name: Install gpg secret key - run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - - - name: Install libcurl - run: sudo apt-get install -y libcurl4-openssl-dev - - - name: Pre-build - run: gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' - - - name: Publish plugins - run: cd compiler && gradle publish -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - - - name: Publish package - run: gradle publish -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 7319e9ae..f81f67d2 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,14 +4,14 @@ on: types: [created] workflow_dispatch: jobs: - publish: + publish-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Java uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - id: install-secret-key name: Install gpg secret key run: | @@ -33,3 +33,25 @@ jobs: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + publish-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Java + uses: actions/setup-java@v1 + with: + java-version: 17 + - id: install-secret-key + name: Install gpg secret key + run: | + cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + gpg --list-secret-keys --keyid-format LONG + + - name: Pre-build + run: gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' || gradle build -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' + + - name: Publish package + run: gradle publish -Psigning.gnupg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}