Skip to content

ci: code quality analysis #8

ci: code quality analysis

ci: code quality analysis #8

Workflow file for this run

name: ci-common
on:
push:
paths:
- 'pta-common/**'
tags:
- 'v*.*.*-pta-common'
branches:
- 'main'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout latest code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
cache-dependency-path: 'pta-common/pom.xml'
- name: Build with Maven
run: mvn -B package --file pta-common/pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GitHub Packages
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, 'pta-common')
run: mvn -B deploy --file pta-common/pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}