-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (84 loc) · 2.21 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
name: CI
on:
push:
branches:
- main
jobs:
export:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "2014.1"
- "2015.1"
- "2015.2"
- "2016.1"
- "2016.2"
- "2017.1"
- "2017.2"
- "2018.1"
- "2019.4"
- "2020.1"
- "2020.2"
- "2020.3"
- "2020.4"
- "2021.1"
- "2021.2"
- "2022.1"
- "2022.2"
- "2022.3"
- "2023.1"
- "2023.2"
- "2023.3"
- "2024.1"
steps:
- uses: actions/checkout@master
- name: Export metadata
uses: nick-invision/retry@v2
with:
max_attempts: 3
timeout_minutes: 20
retry_on: error
command: make ${{ matrix.version }}
- uses: actions/upload-artifact@v3
with:
path: metadata/${{ matrix.version }}/*.csv
name: ${{ matrix.version }}
if-no-files-found: error
retention-days: 1
jar:
runs-on: ubuntu-latest
needs:
- export
steps:
- uses: actions/checkout@master
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/download-artifact@v3
with:
path: metadata
- run: make combine
- uses: actions/upload-artifact@v3
with:
path: metadata/*.csv
name: metadata
if-no-files-found: error
retention-days: 1
- name: build and deploy jar
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump version
run: |
git config --global user.name 'ProjectBot'
git config --global user.email '[email protected]'
VERSION=$(sed -n 's|.*<revision>\(.*\)</revision>.*|\1|p' pom.xml | cut -d- -f1)
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
sed -i "s|<revision>\(.*\)</revision>|<revision>$VERSION</revision>|" pom.xml
git add pom.xml
git commit -m 'auto bump version'
git push