-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (35 loc) · 955 Bytes
/
ci-common.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}