diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 699dbe8..4b42b3c 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -20,87 +20,93 @@ jobs: steps: - name: Checkout uses: DanySK/action-checkout@0.2.14 - - uses: actions/setup-node@v4 + - name: Set up NPM for Windows if: matrix.os == 'windows-2022' - with: - node-version: 18 - cache: 'npm' - - uses: DanySK/build-check-deploy-gradle-action@2.4.8 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: -# Dry-deployment - check-command: ./gradlew build --parallel - deploy-command: >- - ./gradlew - uploadKotlinOSSRHToMavenCentralNexus - uploadPluginMavenToMavenCentralNexus - uploadPluginMarkerMavenToMavenCentralNexus - close - drop - --parallel - should-run-codecov: ${{ runner.os == 'Linux' }} - should-deploy: >- - ${{ - runner.os == 'Linux' - && !github.event.repository.fork - && github.event_name != 'pull_request' - }} - maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing-key: ${{ secrets.SIGNING_KEY }} - signing-password: ${{ secrets.SIGNING_PASSWORD }} - release: - permissions: - contents: write - packages: write - concurrency: - # Only one release job at a time. Strictly sequential. - group: release - needs: - - build - runs-on: ubuntu-22.04 - if: >- - !github.event.repository.fork - && github.event_name != 'pull_request' - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 + shell: bash + run: | + npm config get prefix + echo "$(npm config get prefix)/bin" >> $GITHUB_PATH +# - uses: DanySK/build-check-deploy-gradle-action@2.4.8 +# if: matrix.os == 'windows-2022' # with: -# token: ${{ secrets.DEPLOYMENT_TOKEN }} - - name: Find the version of Node from package.json - id: node-version - run: echo "version=$(jq -r .engines.node package.json)" >> $GITHUB_OUTPUT - - name: Install Node - uses: actions/setup-node@v4.0.2 - with: - node-version: ${{ steps.node-version.outputs.version }} - - uses: DanySK/build-check-deploy-gradle-action@2.4.8 - with: - build-command: true - check-command: true - deploy-command: | - npm install - npx semantic-release - should-run-codecov: false - should-deploy: true - github-token: ${{ github.token }} - gradle-publish-secret: ${{ secrets.GRADLE_PUBLISH_SECRET }} - gradle-publish-key: ${{ secrets.GRADLE_PUBLISH_KEY }} - maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - signing-key: ${{ secrets.SIGNING_KEY }} - signing-password: ${{ secrets.SIGNING_PASSWORD }} - success: - runs-on: ubuntu-22.04 - needs: - - release - - build - if: >- - always() && ( - contains(join(needs.*.result, ','), 'failure') - || !contains(join(needs.*.result, ','), 'cancelled') - ) - steps: - - name: Verify that there were no failures - run: ${{ !contains(join(needs.*.result, ','), 'failure') }} +# build-command: ./gradlew build --parallel +# should-run-codecov: false +# - uses: DanySK/build-check-deploy-gradle-action@2.4.8 +# env: +# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +# with: +## Dry-deployment +# check-command: ./gradlew build --parallel +# deploy-command: >- +# ./gradlew +# uploadKotlinOSSRHToMavenCentralNexus +# uploadPluginMavenToMavenCentralNexus +# uploadPluginMarkerMavenToMavenCentralNexus +# close +# drop +# --parallel +# should-run-codecov: ${{ runner.os == 'Linux' }} +# should-deploy: >- +# ${{ +# runner.os == 'Linux' +# && !github.event.repository.fork +# && github.event_name != 'pull_request' +# }} +# maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} +# maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} +# signing-key: ${{ secrets.SIGNING_KEY }} +# signing-password: ${{ secrets.SIGNING_PASSWORD }} +# release: +# permissions: +# contents: write +# packages: write +# concurrency: +# # Only one release job at a time. Strictly sequential. +# group: release +# needs: +# - build +# runs-on: ubuntu-22.04 +# if: >- +# !github.event.repository.fork +# && github.event_name != 'pull_request' +# steps: +# - name: Checkout +# uses: actions/checkout@v4.1.1 +## with: +## token: ${{ secrets.DEPLOYMENT_TOKEN }} +# - name: Find the version of Node from package.json +# id: node-version +# run: echo "version=$(jq -r .engines.node package.json)" >> $GITHUB_OUTPUT +# - name: Install Node +# uses: actions/setup-node@v4.0.2 +# with: +# node-version: ${{ steps.node-version.outputs.version }} +# - uses: DanySK/build-check-deploy-gradle-action@2.4.8 +# with: +# build-command: true +# check-command: true +# deploy-command: | +# npm install +# npx semantic-release +# should-run-codecov: false +# should-deploy: true +# github-token: ${{ github.token }} +# gradle-publish-secret: ${{ secrets.GRADLE_PUBLISH_SECRET }} +# gradle-publish-key: ${{ secrets.GRADLE_PUBLISH_KEY }} +# maven-central-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} +# maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} +# signing-key: ${{ secrets.SIGNING_KEY }} +# signing-password: ${{ secrets.SIGNING_PASSWORD }} +# success: +# runs-on: ubuntu-22.04 +# needs: +# - release +# - build +# if: >- +# always() && ( +# contains(join(needs.*.result, ','), 'failure') +# || !contains(join(needs.*.result, ','), 'cancelled') +# ) +# steps: +# - name: Verify that there were no failures +# run: ${{ !contains(join(needs.*.result, ','), 'failure') }}