-
Notifications
You must be signed in to change notification settings - Fork 21
42 lines (40 loc) · 1.07 KB
/
push-ci.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 build and push
on:
push:
branches:
- main
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: |
11
17
distribution: 'temurin'
- run: mvn -B -U clean verify
get-version:
runs-on: ubuntu-latest
outputs:
project-version: ${{ steps.get-version.outputs.project-version }}
steps:
- uses: actions/checkout@v4
- id: get-version
run: |
PROJECT_VERSION="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
echo "project-version=${PROJECT_VERSION}" >> "${GITHUB_OUTPUT}"
publish-snapshot:
needs: get-version
uses: ./.github/workflows/maven-central-publish.yml
secrets: inherit
with:
publish-cmd: './release-snapshot.sh'
jdk-versions: |
11
17
if: ${{ github.repository_owner == 'cryostatio' && endsWith(needs.get-version.outputs.project-version, '-SNAPSHOT') }}