We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c048425 commit f53c115Copy full SHA for f53c115
1 file changed
.github/workflows/ci-cd.yml
@@ -4,6 +4,9 @@ on:
4
push:
5
tags:
6
- '*'
7
+ pull_request:
8
+ branches:
9
+ - '**'
10
11
jobs:
12
build-and-test:
@@ -16,10 +19,18 @@ jobs:
16
19
java-version: '25'
17
20
distribution: 'temurin'
18
21
cache: maven
22
+ - name: Set version
23
+ run: |
24
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
25
+ echo "REVISION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
26
+ else
27
+ echo "REVISION=0.0.0-SNAPSHOT" >> $GITHUB_ENV
28
+ fi
29
- name: Build with Maven
- run: mvn -B package -Drevision=${{ github.ref_name }} --file pom.xml
30
+ run: mvn -B package -Drevision=${{ env.REVISION }} --file pom.xml
31
32
publish:
33
+ if: startsWith(github.ref, 'refs/tags/')
34
needs: build-and-test
35
runs-on: ubuntu-latest
36
permissions:
0 commit comments