Skip to content

Version 0.21.0

Version 0.21.0 #72

Workflow file for this run

name: Release Build
on:
release:
types: [published]
workflow_dispatch:
inputs:
rebuild:
description: 'A tag name for building previously created release'
required: false
default: '0.0.0'
buildOptions:
description: 'Additional options for Gradle build command'
required: false
default: ''
jobs:
run_playwright_tests:
uses: ./.github/workflows/run-playwright-tests.yml
release:
needs: [run_playwright_tests]
concurrency: release
runs-on: ubuntu-latest
outputs:
version: ${{steps.get-version.outputs.version}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check version
id: get-version
run: |
if [[ "${{ github.event.action }}" == "published" ]]
then
VERSION="${{ github.event.release.tag_name }}"
else
LATEST=`git tag -l --sort=creatordate | tail -1`
VERSION=`echo ${LATEST} | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g'`-${{ github.sha }}
fi
if [[ -n "${{ github.event.inputs.buildOptions }}" ]]
then
VERSION="${{ github.event.inputs.buildOptions }}"
fi
echo ::set-output name=version::${VERSION}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_GITHUB }}
- name: Test and build the image
env:
GENERATE_SOURCEMAP: false
CI: false
run: ./gradlew test jib ${{ github.event.inputs.buildOptions }} --no-daemon --scan --image ghcr.io/opendatadiscovery/odd-platform -Pversion=${{ steps.get-version.outputs.version }} -PcontainerBuildArm=true -PcontainerBuildAmd=true