-
Notifications
You must be signed in to change notification settings - Fork 52
66 lines (62 loc) · 2.35 KB
/
jar-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
65
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-release:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
- name: Build with Maven
run: |
cat <<EOF > ~/.m2/settings.xml
<settings>
<servers>
<server>
<id>artifactory-snapshots</id>
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username>
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password>
</server>
<server>
<id>artifactory-releases</id>
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username>
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password>
</server>
<server>
<id>artifactory</id>
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username>
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
mvn -q -ff package -Dskip.surefire.tests -DskipTests -P dse,hcd
- name: zip-up
run: |
zip jars.zip \
management-api-agent-shaded-libs/target/datastax-mgmtapi-agent-shaded-libs*.jar \
management-api-agent-common/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-4.x/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-4.1.x/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-5.0.x/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-dse-6.8/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-dse-6.9/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-hcd/target/datastax-mgmtapi-agent-*.jar \
management-api-server/target/datastax-mgmtapi-server-*.jar \
management-api-common/target/datastax-mgmtapi-common-*.jar
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: jars.zip