-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.96 KB
/
main.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CD-CI
on:
push:
branches: [ main ]
jobs:
build:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.pusher.email != '[email protected]'
runs-on: ubuntu-latest
steps:
- name: Updating runner
run: sudo apt-get update
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout
uses: actions/checkout@v2
- name: Preparing settings.xml
uses: s4u/[email protected]
with:
githubServer: false
servers: |
[
{
"id": "packagecloud-flossware",
"configuration": {
"httpHeaders": {
"property": {
"name": "Authorization",
"value": "Bearer ${{ secrets.FLOSSWARE_PACKAGECLOUD_TOKEN }}"
}
}
}
}
]
- name: Setup .gitconfig for version bumps
uses: oleksiyrudenko/gha-git-credentials@latest
with:
global: true
name: 'Version Bump'
email: '[email protected]'
actor: 'VersionBump'
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Incrementing pom.xml version
run: "mvn -U build-helper:parse-version versions:set -DnewVersion=\\${parsedVersion.majorVersion}.\\${parsedVersion.nextMinorVersion} versions:commit"
- name: Ensure latests depenendencies in pom.xml
run: "mvn -Dincludes='org.apache.commons:*, org.apache.cxf:*, org.flossware:*, org.solenopsis:*, org.junit.jupiter:*' -DgenerateBackupPoms=false versions:update-properties"
- name: Building
run: "mvn -U clean install"
- name: Deploy to packagecloud.io
run: "mvn -DskipTests deploy"
- name: Checkin and tag to github
run: "mvn scm:checkin scm:tag"