-
Notifications
You must be signed in to change notification settings - Fork 14
90 lines (78 loc) · 4.53 KB
/
maven-publish.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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: Maven Package
on:
release:
types: [prereleased]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven of project
run: |
export MVN_ARGS_PROJECT="-DbuildNumberSuffix= -B --file pom.xml"
mvn ${MVN_ARGS_PROJECT} package
- name: Get built jar filename
run: |
export MVN_ARGS_FUNCTIONS="-DbuildNumberSuffix= -B --file plugins/functions/pom.xml"
echo "FILENAME_FUNCTIONS=$(mvn ${MVN_ARGS_FUNCTIONS} org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" >> $GITHUB_ENV
export MVN_ARGS_PROTOCOL_EVENTHUBS="-DbuildNumberSuffix= -B --file plugins/protocol/eventhubs/pom.xml"
echo "FILENAME_PROTOCOL_EVENTHUBS=$(mvn ${MVN_ARGS_PROTOCOL_EVENTHUBS} org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" >> $GITHUB_ENV
export MVN_ARGS_PROTOCOL_SERVICEBUS="-DbuildNumberSuffix= -B --file plugins/protocol/servicebus/pom.xml"
echo "FILENAME_PROTOCOL_SERVICEBUS=$(mvn ${MVN_ARGS_PROTOCOL_SERVICEBUS} org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" >> $GITHUB_ENV
export MVN_ARGS_PROTOCOL_STORAGEQUEUE="-DbuildNumberSuffix= -B --file plugins/protocol/storagequeue/pom.xml"
echo "FILENAME_PROTOCOL_STORAGEQUEUE=$(mvn ${MVN_ARGS_PROTOCOL_STORAGEQUEUE} org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" >> $GITHUB_ENV
export MVN_ARGS_LOADTESTINGSTUB="-DbuildNumberSuffix= -B --file plugins/AzLoadTestingStub/pom.xml"
echo "FILENAME_LOADTESTINGSTUB=$(mvn ${MVN_ARGS_LOADTESTINGSTUB} org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" >> $GITHUB_ENV
- name: Upload built jar of functions
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./plugins/functions/target/${{ env.FILENAME_FUNCTIONS }}.jar
asset_name: ${{ env.FILENAME_FUNCTIONS }}.jar
asset_content_type: application/java-archive
- name: Upload built jar of AzEventHubs sampler
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./plugins/protocol/eventhubs/target/${{ env.FILENAME_PROTOCOL_EVENTHUBS }}.jar
asset_name: ${{ env.FILENAME_PROTOCOL_EVENTHUBS }}.jar
asset_content_type: application/java-archive
- name: Upload built jar of AzServiceBus sampler
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./plugins/protocol/servicebus/target/${{ env.FILENAME_PROTOCOL_SERVICEBUS }}.jar
asset_name: ${{ env.FILENAME_PROTOCOL_SERVICEBUS }}.jar
asset_content_type: application/java-archive
- name: Upload built jar of AzStorageQueue sampler
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./plugins/protocol/storagequeue/target/${{ env.FILENAME_PROTOCOL_STORAGEQUEUE }}.jar
asset_name: ${{ env.FILENAME_PROTOCOL_STORAGEQUEUE }}.jar
asset_content_type: application/java-archive
- name: Upload built jar of AzLoadTestingStub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./plugins/AzLoadTestingStub/target/${{ env.FILENAME_LOADTESTINGSTUB }}.jar
asset_name: ${{ env.FILENAME_LOADTESTINGSTUB }}.jar
asset_content_type: application/java-archive