-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (54 loc) · 2.49 KB
/
refapp-jiraserver-production.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
name: Refapp JiraServer Production
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.')"
- name: Delete users backdoor servlet
uses: JesseTG/[email protected]
with:
path: src/main/java/com/microsoft/teams/servlets/TeamsAtlasUserServlet.java
- name: Delete users backdoor servlet test
uses: JesseTG/[email protected]
with:
path: src/test/java/com/microsoft/teams/servlets/TeamsAtlasUserServletTest.java
- name: Delete users backdoor resource
uses: Mudlet/xmlstarlet-action@master
with:
args: ed --inplace -d "/atlassian-plugin/servlet[@key='test']" src/main/resources/atlassian-plugin.xml
- name: Replace ArtifactId Value
uses: Mudlet/xmlstarlet-action@master
with:
args: ed --inplace -N s=http://maven.apache.org/POM/4.0.0 -u "/s:project/s:artifactId" -v microsoft-teams pom.xml
- name: Replace Version Value
uses: Mudlet/xmlstarlet-action@master
with:
args: ed --inplace -N s=http://maven.apache.org/POM/4.0.0 -u "/s:project/s:version" -v ${{ steps.date.outputs.date }}${{ github.run_number }} pom.xml
- name: Replace FinalName Value
uses: Mudlet/xmlstarlet-action@master
with:
args: ed --inplace -N s=http://maven.apache.org/POM/4.0.0 -u "/s:project/s:build/s:finalName" -v microsoft-teams-${{ steps.date.outputs.date }}${{ github.run_number }} pom.xml
- name: Run a powershell script
run: ./setEnvironmentProperties.ps1 "src/main/resources/integration.properties" "c8e573e8-b3ff-4c89-afbd-d75731ba97fc" "microsoft-teams" "https://jira-server.msteams-atlassian.com/JiraGateway?atlasId=%s&atlasUrl=%s&pluginVersion=%s" ${{ steps.date.outputs.date }}${{ github.run_number }} "https://jira-server.msteams-atlassian.com"
shell: pwsh
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: RefAppAddon.Production.${{ steps.date.outputs.date }}${{ github.run_number }}
path: ${{ github.workspace }}/target/*.jar