-
Notifications
You must be signed in to change notification settings - Fork 0
172 lines (166 loc) · 6.13 KB
/
services.yml
File metadata and controls
172 lines (166 loc) · 6.13 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Dont-code Services release
on:
workflow_dispatch:
inputs:
version:
description: The version of the release
required: true
type: string
branch:
description: The branch to use. Only main is released, nothing is deployed
required: false
default: Development
type: choice
options:
- Development
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout common repositories
uses: actions/checkout@v4
with:
repository: dont-code/core
path: core
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- uses: actions/checkout@v4
with:
repository: dont-code/common-quarkus-mongo
path: common-quarkus-mongo
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Create mongo Docker container
id: build_mongo_docker
uses: DigiPie/mongo-action@v2.0.1
with:
image_version: latest
port: 27017
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode --update-snapshots install
working-directory: core/java
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-core.version
mvn --batch-mode --update-snapshots install
working-directory: common-quarkus-mongo
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Build Ide-services
uses: actions/checkout@v4
with:
repository: dont-code/ide-services
path: ide-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-common.version
mvn --batch-mode --update-snapshots install
working-directory: ide-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Build Preview-services
uses: actions/checkout@v4
with:
repository: dont-code/preview-services
path: preview-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-common.version
mvn --batch-mode --update-snapshots install
working-directory: preview-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Build Data services
uses: actions/checkout@v4
with:
repository: dont-code/data-services
path: data-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode versions:update-property -DnewVersion=${{inputs.version}} -Dproperty=dontcode-common.version
mvn --batch-mode --update-snapshots install
working-directory: data-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Project services
uses: actions/checkout@v4
with:
repository: dont-code/project-services
path: project-services
fetch-depth: 0
ref: ${{inputs.branch}}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Build
run: |
mvn --batch-mode versions:set -DnewVersion=${{inputs.version}}
mvn --batch-mode --update-snapshots install
working-directory: project-services
env:
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}}
- name: Create release
if: ${{ success() && inputs.branch == 'main'}}
uses: vimtor/action-zip@v1
with:
files: ide-services/target/ide-services-runner.jar preview-services/target/preview-services-runner.jar data-services/target/data-services-runner.jar project-services/target/project-services-runner.jar
dest: dont-code-release-runners.zip
- name: Create release
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
dont-code-release-runners.zip
- name: Create release
if: ${{ success() && inputs.branch == 'main'}}
uses: softprops/action-gh-release@master
with:
name: v${{inputs.version}}
tag_name: v${{inputs.version}}
files: |
checksum.txt
dont-code-release-runners.zip
- name: Deploy core release
if: ${{ success() }}
run: |
mvn --batch-mode deploy
working-directory: core/java
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Deploy quarkus-mongo release
if: ${{ success() }}
run: |
mvn --batch-mode deploy
working-directory: common-quarkus-mongo
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}