-
Notifications
You must be signed in to change notification settings - Fork 52
64 lines (60 loc) · 2.16 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
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-release:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup JDK 11
uses: actions/setup-java@v3
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 -DskipTests -P dse,dse7
- name: zip-up
run: |
zip jars.zip \
management-api-agent-common/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-3.x/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-dse-6.8/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-dse7/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