From 294498f04956eb45298041ae08d1fea948c39799 Mon Sep 17 00:00:00 2001 From: alansemenov Date: Mon, 14 Oct 2024 11:23:23 +0200 Subject: [PATCH] Publish to Artifactory on release --- .github/workflows/release.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 713dba0..4a6113f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,13 +28,28 @@ jobs: node-version: '20.x' registry-url: 'https://registry.npmjs.org' - - uses: actions/setup-java@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: 'temurin' - cache: 'gradle' - - run: ./gradlew build --no-daemon + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Get publishing variables + id: publish_vars + uses: enonic/release-tools/publish-vars@master + env: + PROPERTIES_PATH: './gradle.properties' + JAVA_HOME: '' + + - name: Verify release version + if: steps.publish_vars.outputs.release != 'true' + run: exit 1 + + - name: Publish + run: ./gradlew publish -PrepoKey=${{ steps.publish_vars.outputs.repo }} -PrepoUser=ci -PrepoPassword=${{ secrets.ARTIFACTORY_PASSWORD }} - name: Publish working-directory: ./build/types