-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (30 loc) · 944 Bytes
/
cd_build.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
name: Continous Delivery
on:
push:
branches: [ master ]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
settings-path: ~ # location for the settings.xml file
- name: Build, publish to GPR and tag
run: |
set -e
if [ "$GITHUB_REPOSITORY" == "gruelbox/dropwizard-guice-box" ]; then
revision="2.1.$GITHUB_RUN_NUMBER"
echo "Building $revision at $GITHUB_SHA"
mvn -B deploy -s $GITHUB_WORKSPACE/settings.xml -Drevision="$revision"
echo "Tagging $revisionn"
git tag $revision
git push origin $revision
else
mvn -B package
fi
env:
GITHUB_TOKEN: ${{ github.token }}