-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (79 loc) · 3.18 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.pusher.email != 'version-bump@solenopsis.org'
name: CD-CI for RPM
on:
push:
branches: [ sfloess_issue-10 ]
jobs:
build:
if: github.event_name == 'push' && github.ref == 'refs/heads/sfloess_issue-10' && github.event.pusher.email != 'version-bump@flossware.org'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Preparing settings.xml
uses: s4u/maven-settings-action@v3.0.0
with:
githubServer: false
servers: |
[
{
"id": "packagecloud-flossware",
"configuration": {
"httpHeaders": {
"property": {
"name": "Authorization",
"value": "${{ secrets.PCT }}"
}
}
}
}
]
- run: cat ~/.m2/settings.xml
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Deploy
run: "mvn -DskipTests clean install deploy"
- uses: oleksiyrudenko/gha-git-credentials@latest
with:
global: true
name: 'Version Bump'
email: 'version-bump@flossware.org'
actor: 'VersionBump'
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Preparing environment
run: sudo apt-get update
- name: Preparing settings.xml
uses: s4u/maven-settings-action@v3.0.0
with:
githubServer: false
servers: |
[
{
"id": "packagecloud-flossware",
"configuration": {
"httpHeaders": {
"property": {
"name": "Authorization",
"value": "${{ secrets.PACKAGECLOUD_TOKEN }}"
}
}
}
}
]
- uses: actions/checkout@v2
- run: cat ~/.m2/settings.xml
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Incrementing pom.xml version
run: "mvn -U build-helper:parse-version versions:set -DnewVersion=\\${parsedVersion.majorVersion}.\\${parsedVersion.nextMinorVersion} versions:commit"
- name: Build
run: "mvn -U clean install"
- name: Deploy
run: "mvn -DskipTests deploy"
- name: Tag
run: "mvn scm:checkin scm:tag"