-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (46 loc) · 2.17 KB
/
refapp-jiraserver-staging.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
name: Refapp JiraServer Staging
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: 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-staging 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-staging-${{ steps.date.outputs.date }}${{ github.run_number }} pom.xml
- name: Replace ProjectName Value
uses: Mudlet/xmlstarlet-action@master
with:
args: ed --inplace -N s=http://maven.apache.org/POM/4.0.0 -u "/s:project/s:name" -v Microsoft-Teams-for-Jira-Server(Staging) pom.xml
- name: Run a powershell script
run: ./setEnvironmentProperties.ps1 "src/main/resources/integration.properties" "e52889b0-9b26-4f1c-b3db-4211be72d164" "microsoft-teams-staging" "https://jira-server-staging.msteams-atlassian.com/JiraGateway?atlasId=%s&atlasUrl=%s&pluginVersion=%s" ${{ steps.date.outputs.date }}${{ github.run_number }} "https://jira-server-staging.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/upload-artifact@v4
with:
name: RefAppAddon.Staging.${{ steps.date.outputs.date }}${{ github.run_number }}
path: ${{ github.workspace }}/target/*.jar