-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
release.yaml
64 lines (64 loc) · 2.2 KB
/
release.yaml
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
pipeline:
name: release
jobs:
- name: release
enabled: true
steps:
- name: change version
enabled: true
run: |
./mvnw -B versions:set -DnewVersion="${{ release }}" -DprocessAllModules >> /dev/null
rm -Rf $(find . -name "*versionsBackup")
- name: build & verify
enabled: true
run: ./mvnw -B clean verify
- name: deploy
enabled: true
run: ./mvnw -s ~/.m2/prometheus.settings.xml -P release clean deploy
- name: create / clean RELEASE directory
enabled: true
run: |
mkdir -p RELEASE
rm -Rf RELEASE/*
- name: copy artifacts
enabled: true
run: |
cp jmx_prometheus_javaagent/target/jmx_prometheus_javaagent-${{ release }}.jar RELEASE/.
cp jmx_prometheus_standalone/target/jmx_prometheus_standalone-${{ release }}.jar RELEASE/.
- name: create signature & checksums
enabled: true
working-directory: RELEASE
run: |
for FILE in *.jar; do gpg --armor --detach-sign "$FILE"; done
for FILE in *.jar; do sha256sum "$FILE" > "$FILE".sha256; done
- name: commit version
enabled: true
run: |
git add -u
git commit -s -m "release-${{ release }}"
- name: tag version
enabled: true
run: |
git tag "${{ release }}"
git push --tags
- name: checkout & push release branch
enabled: true
run: |
git checkout -b "release-${{ release }}"
git push --set-upstream origin "release-${{ release }}"
- name: checkout main
enabled: true
run: git checkout main
- name: change version
enabled: true
run: |
./mvnw -B versions:set -DnewVersion="${{ release }}-post" -DprocessAllModules >> /dev/null
rm -Rf $(find . -name "*versionsBackup")
- name: commit version
enabled: true
run: |
git add -u
git commit -s -m "Prepare for development"
- name: git push
enabled: true
run: git push