forked from liquibase/liquibase
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (120 loc) · 3.6 KB
/
build-azure-uber-jar.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Build Azure Uber jar
on:
workflow_call:
inputs:
branch:
description: 'branch to check out'
required: true
type: string
liquibase-version:
description: 'liquibase version'
required: true
type: string
workflow_dispatch:
inputs:
branch:
description: 'branch to check out'
required: true
type: string
liquibase-version:
description: 'liquibase version'
required: true
type: string
env:
MAVEN_VERSION: '3.9.2'
jobs:
build:
name: Build
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout liquibase-pro
uses: actions/checkout@v4
with:
repository: liquibase/liquibase-pro
ref: ${{ inputs.branch }}
token: ${{ secrets.BOT_TOKEN }}
path: liquibase-pro
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: |
[
{
"id": "liquibase",
"url": "https://maven.pkg.github.com/liquibase/liquibase",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
},
{
"id": "liquibase-pro",
"url": "https://maven.pkg.github.com/liquibase/liquibase-pro",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
}
]
plugin_repositories: |
[
{
"id": "file-replacer-maven-plugin",
"url": "https://maven.pkg.github.com/StevenMassaro/file-replacer-maven-plugin",
"releases": {
"updatePolicy": "always",
"enabled": "true"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
}
]
servers: |
[
{
"id": "liquibase",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
},
{
"id": "liquibase-pro",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
},
{
"id": "file-replacer-maven-plugin",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
}
]
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: ${{ env.MAVEN_VERSION }}
- name: Set version
run: |
cd liquibase-pro/liquibase-azure-deps && mvn versions:set -DnewVersion=${{ inputs.liquibase-version }}
- name: Build & Test
run: |
cd liquibase-pro/liquibase-azure-deps && mvn -B clean package
- name: Archive Modules
uses: actions/upload-artifact@v4
with:
name: liquibase-pro-azure-artifacts
path: liquibase-pro/liquibase-azure-deps/target/liquibase-azure-deps-${{ inputs.liquibase-version }}.jar