Skip to content

STUD-5585: Migrate to GHA #2

STUD-5585: Migrate to GHA

STUD-5585: Migrate to GHA #2

Workflow file for this run

name: flip-tables CI
on:
pull_request:
branches: [ '*' ]
push:
branches: [ 'master' ]
tags: [ '*' ]
permissions:
contents: read
id-token: write
jobs:
gradle-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '8'
- uses: gradle/actions/setup-gradle@v3
- name: Build Release Version
if: ${{ github.ref_type == 'tag' }}
run: ./gradlew clean assemble --info -Dorg.gradle.project.version=${{ github.ref_name }}
- name: Build Non-Release Version
if: ${{ github.ref_type != 'tag' }}
run: ./gradlew clean assemble --info
- name: Bundle/TAR up JAR files
run: |
tar -cvzf ./build/libs/java.tar.gz ./build/libs/*.jar
ls -ls ./build/libs
- name: Publish Artifact
uses: actions/upload-artifact@v3
with:
name: java
path: ./build/libs/connector-sdk-java-*.*.jar
- name: Publish Snapshot
if: ${{ github.ref_type != 'tag' && github.ref_name != 'master' && hashFiles('./build/libs/*-SNAPSHOT.jar') != '' }}
uses: actions/upload-artifact@v3
with:
name: java-snapshot
path: ./build/libs/*-SNAPSHOT.jar
Unit-Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '8'
- uses: gradle/actions/setup-gradle@v3
- name: Run Tests
run: ./gradlew --no-daemon --console=plain test