Skip to content

Gradle Build

Gradle Build #12362

Workflow file for this run

name: Gradle Build
on:
push:
workflow_dispatch:
concurrency: build-${{ github.ref }}
jobs:
publish_vars:
runs-on: ubuntu-latest
outputs:
publish: ${{ steps.publish_vars.outputs.release != 'true' && (env.ACTUAL_GITHUB_REF == 'refs/heads/master' || startsWith(env.ACTUAL_GITHUB_REF, 'refs/heads/7.')) }}
repo: ${{ steps.publish_vars.outputs.repo }}
steps:
- name: Extract actual github.ref
run: echo "ACTUAL_GITHUB_REF=${ACTUAL_REF}" >> $GITHUB_ENV
env:
ACTUAL_REF: ${{ github.ref }}
- uses: actions/checkout@v4
- name: Get publishing variables
id: publish_vars
uses: enonic/release-tools/publish-vars@master
env:
PROPERTIES_PATH: './gradle.properties'
build:
strategy:
matrix:
type: [sdk, server]
os: [mac, mac-arm64, linux, linux-arm64, windows]
include:
- type: server
os: generic
runs-on: ubuntu-latest
needs: publish_vars
if: needs.publish_vars.outputs.publish == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish
run: ./gradlew --refresh-dependencies publish -Pos=${{ matrix.os }} -Ptype=${{ matrix.type }} -PrepoKey=${{ needs.publish_vars.outputs.repo }} -PrepoUser=ci -PrepoPassword=${{ secrets.ARTIFACTORY_PASSWORD }}