* Backwards compatibility with JVM prior to 21.0.2+3 #139
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: [ "develop" ] | |
tags: | |
- '*' | |
paths-ignore: | |
- '.github/**' | |
- '**/**.md' | |
- 'docs/**' | |
- 'badges/**' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.sha }} | |
cancel-in-progress: true | |
jobs: | |
testLinux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21.0.2' | |
distribution: 'temurin' | |
cache: maven | |
- name: Test | |
run: mvn -B -T 4 test | |
testWindows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Test | |
run: mvn -B -T 4 test | |
maven: | |
needs: [testLinux, testWindows] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21.0.2' | |
distribution: 'temurin' | |
cache: maven | |
- name: Describe tag | |
id: tag | |
continue-on-error: true | |
run: echo "tag=`echo $(git describe --exact-match --tags --match '[0-9]*.[0-9]*.[0-9]*')`" >> $GITHUB_OUTPUT | |
- name: Adjust maven version | |
if: steps.tag.outputs.tag != '' | |
run: mvn versions:set versions:update-child-modules -DnewVersion=${{ steps.tag.outputs.tag }} -DprocessAllModules | |
- name: Deploy | |
run: mvn -B -T 4 deploy -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN -Dmaven.test.skip=true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package runtime | |
if: steps.tag.outputs.tag != '' | |
run: | | |
mv modules/vclu/target/vclu-jar-with-dependencies.jar modules/vclu/target/vclu.jar | |
mv modules/client/target/client-jar-with-dependencies.jar modules/client/target/client.jar | |
zip -r runtime-${{ steps.tag.outputs.tag }}.zip ./runtime | |
cd ./runtime && zip -r ../device-interfaces-${{ steps.tag.outputs.tag }}.zip ./device-interfaces | |
- name: Release | |
if: steps.tag.outputs.tag != '' | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
runtime-${{ steps.tag.outputs.tag }}.zip | |
device-interfaces-${{ steps.tag.outputs.tag }}.zip | |
modules/vclu/target/vclu.jar | |
modules/client/target/client.jar | |
- name: Submit Dependency Snapshot | |
if: github.ref == 'refs/heads/develop' | |
uses: advanced-security/maven-dependency-submission-action@v3 | |
docker: | |
needs: [testLinux] | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup master branche locally | |
continue-on-error: true | |
run: | | |
git fetch origin master:master | |
- name: Setup develop branche locally | |
continue-on-error: true | |
run: | | |
git fetch origin develop:develop | |
- name: Describe tag | |
id: tag | |
continue-on-error: true | |
run: | | |
echo "tag=`echo $(git describe --exact-match --tags --match '[0-9]*.[0-9]*.[0-9]*')`" >> $GITHUB_OUTPUT | |
echo "master_head=`echo $(git branch --points-at HEAD --format='%(refname)' | grep master)`" >> $GITHUB_OUTPUT | |
echo "develop_head=`echo $(git branch --points-at HEAD --format='%(refname)' | grep develop)`" >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Container Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
psobiech/opengr8on | |
ghcr.io/psobiech/opengr8on | |
tags: | | |
type=raw,value=latest,enable=${{ contains(steps.tag.outputs.master_head, 'refs/heads/master') }} | |
type=raw,value=master,enable=${{ contains(steps.tag.outputs.master_head, 'refs/heads/master') }} | |
type=raw,value=edge,enable=${{ contains(steps.tag.outputs.develop_head, 'refs/heads/develop') }} | |
type=raw,value=develop,enable=${{ contains(steps.tag.outputs.develop_head, 'refs/heads/develop') }} | |
type=semver,pattern={{version}},value=${{ steps.tag.outputs.tag }},enable=${{ steps.tag.outputs.tag != '' }} | |
type=semver,pattern={{major}}.{{minor}},value=${{ steps.tag.outputs.tag }},enable=${{ steps.tag.outputs.tag != '' }} | |
type=semver,pattern={{major}},value=${{ steps.tag.outputs.tag }},enable=${{ steps.tag.outputs.tag != '' && !startsWith(steps.tag.outputs.tag, '0.') }} | |
type=pep440,priority=899,pattern={{version}},value=${{ steps.tag.outputs.tag }},enable=${{ steps.tag.outputs.tag != '' }} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=schedule | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
target: app-runtime | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
annotations: ${{ steps.meta.outputs.annotations }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |