-
Notifications
You must be signed in to change notification settings - Fork 20
46 lines (44 loc) · 1.48 KB
/
test.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
43
44
45
46
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Test CI
on:
push:
branches:
pull_request:
branches:
workflow_dispatch:
jobs:
linuxbuild:
name: testbuild
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Java Zulu 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Extract Version
uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'
- name: Set Version Release
run: |
mvn -B versions:set -DnewVersion="${{steps.version.outputs.full_without_prefix}}"
echo -n "${{steps.version.outputs.full_without_prefix}}" > ./src/main/resources/org/correomqtt/business/utils/version.txt
if: steps.version.outputs.is_valid == 'true'
shell: bash
- name: Set Version Test
run: |
mvn -B versions:set -DnewVersion="0.0.1"
echo -n "0.0.1" > ./src/main/resources/org/correomqtt/business/utils/version.txt
shell: bash
if: steps.version.outputs.is_valid != 'true'
- name: Build
run: |
mvn -B clean install -DskipTests=true
shell: bash