1
- name : Release
1
+ name : Release Client
2
2
on :
3
3
push :
4
4
tags :
5
- - ' *'
5
+ - ' client. *'
6
6
7
7
env :
8
8
# GCS_BUCKET is the name of the Google Cloud Storage bucket to which all artifacts are deployed.
9
9
GCS_BUCKET : mitbattlecode-releases
10
10
11
- # RELEASE_ARTIFACT_ID is the name of the Maven artifact produced by the buildsystem.
12
- # Important: you must make sure no ID is a prefix of a different ID. Otherwise, you could
13
- # inadvertently cause unintended episodes to become public.
14
- RELEASE_ARTIFACT_ID : battlecode24
15
-
16
- # IS_PUBLIC is whether to release deployments publicly. Set to exactly the text "YES" to do so.
17
- IS_PUBLIC : NO
11
+ # CLIENT_ARTIFACT_ID is the name of the base client artifact produced by the buildsystem.
12
+ CLIENT_ARTIFACT_ID : battlecode25
18
13
19
14
jobs :
20
15
build-client :
@@ -25,19 +20,19 @@ jobs:
25
20
strategy :
26
21
matrix :
27
22
include :
28
- - platform-name : " macos-latest"
29
- build-name : " macos"
30
- tauri-target : " universal-apple-darwin"
31
- tauri-copy-path : " bundle/macos/*.app"
23
+ # - platform-name: "macos-latest"
24
+ # build-name: "macos"
25
+ # tauri-target: "universal-apple-darwin"
26
+ # tauri-copy-path: "bundle/macos/*.app"
32
27
- platform-name : " ubuntu-latest"
33
28
build-name : " linux"
34
29
tauri-target : " x86_64-unknown-linux-gnu"
35
30
tauri-copy-path : " bundle/appimage/*.AppImage"
36
31
upload-dist : true
37
- - platform-name : " windows-latest"
38
- build-name : " windows"
39
- tauri-target : " x86_64-pc-windows-msvc"
40
- tauri-copy-path : " *.exe"
32
+ # - platform-name: "windows-latest"
33
+ # build-name: "windows"
34
+ # tauri-target: "x86_64-pc-windows-msvc"
35
+ # tauri-copy-path: "*.exe"
41
36
runs-on : ${{ matrix.platform-name }}
42
37
env :
43
38
TAURI_OUTPUT : ./src-tauri/target/${{ matrix.tauri-target }}/release/${{ matrix.tauri-copy-path }}
65
60
if : startsWith(matrix.platform-name, 'ubuntu')
66
61
run : |
67
62
sudo apt-get update
68
- sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
63
+ sudo apt-get install -y libwebkit2gtk-4.0-37 build-essential wget libssl-dev libgtk-3-0 libayatana-appindicator3-dev librsvg2-dev
69
64
npm install @tauri-apps/cli-linux-x64-gnu
70
65
71
66
- name : Install windows dependencies
@@ -135,6 +130,7 @@ jobs:
135
130
- name : Inject release version
136
131
run : |
137
132
release_version=${GITHUB_REF#refs/*/}
133
+ release_version=${release_version#client.}
138
134
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
139
135
echo "The release version is $release_version"
140
136
@@ -148,28 +144,6 @@ jobs:
148
144
- name : Set up Google Cloud SDK
149
145
uses : ' google-github-actions/setup-gcloud@v1'
150
146
151
- - name : Clone private maps
152
- if : ${{ env.IS_PUBLIC != 'YES' }}
153
- uses : actions/checkout@v3
154
- with :
155
- repository : battlecode/private-maps
156
- token : ${{ secrets.CI_REPOSITORY_CLONE_PAT }}
157
- path : private-maps
158
-
159
- - name : Inject private maps
160
- if : ${{ env.IS_PUBLIC != 'YES' }}
161
- run : |
162
- source="private-maps/$RELEASE_ARTIFACT_ID"
163
- dest="engine/src/main/battlecode/world/resources"
164
- if [ -d "$source" ]; then
165
- cp -r -i "$source/." "$dest/" < /dev/null &> private-maps-copy-log
166
- if [ -s "private-maps-copy-log" ]; then
167
- echo "FAILED! Public and private maps should not intersect."
168
- cat private-maps-copy-log
169
- exit 1
170
- fi
171
- fi
172
-
173
147
- name : Set up JDK 8
174
148
uses : actions/setup-java@v3
175
149
with :
@@ -183,33 +157,33 @@ jobs:
183
157
184
158
# Always cleanup even if other commands failed so we don't unnecessarily store
185
159
# the artifacts in the cloud
186
- - name : Cleanup client artifacts
187
- uses : geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af
188
- if : always()
189
- with :
190
- name : client-*
191
-
192
- - name : Publish to local repository
193
- run : ./gradlew publishToMavenLocal -Prelease_version=$RELEASE_VERSION
160
+ # - name: Cleanup client artifacts
161
+ # uses: geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af
162
+ # if: always()
163
+ # with:
164
+ # name: client-*
194
165
195
166
- name : Determine access control
196
167
run : |
197
- [[ "$IS_PUBLIC" = "YES" ]] && acl="public-read" || acl="project-private "
168
+ acl="public-read"
198
169
echo "OBJECT_ACL=$acl" >> $GITHUB_ENV
199
170
echo "Objects will be uploaded with ACL $acl"
200
171
201
- - name : Upload maven artifacts to remote repository
202
- run : gsutil -m rsync -a $OBJECT_ACL -r $HOME/.m2/repository/org/battlecode gs://$GCS_BUCKET/maven/org/battlecode
203
-
204
- - name : Upload javadocs
172
+ - name : Publish to local repository
205
173
run : |
206
- unzip -d ${{ runner.temp }}/javadoc $HOME/.m2/repository/org/battlecode/$RELEASE_ARTIFACT_ID/$RELEASE_VERSION/*-javadoc.jar
207
- gsutil -m rsync -a $OBJECT_ACL -r ${{ runner.temp }}/javadoc gs://$GCS_BUCKET/javadoc/$RELEASE_ARTIFACT_ID/$RELEASE_VERSION
174
+ id_base=${CLIENT_ARTIFACT_ID}-client
175
+ path_base=client/artifacts/client
176
+ #./gradlew publishClientPublicationToMavenLocal -Prelease_version=$RELEASE_VERSION -Partifact_id=${id_base}-win-tauri -Partifact_path=${path_base}-windows/tauri-output.zip
177
+ #./gradlew publishClientPublicationToMavenLocal -Prelease_version=$RELEASE_VERSION -Partifact_id=${id_base}-mac-tauri -Partifact_path=${path_base}-macos/tauri-output.zip
178
+ ./gradlew publishClientPublicationToMavenLocal -Prelease_version=$RELEASE_VERSION -Partifact_id=${id_base}-linux-tauri -Partifact_path=${path_base}-linux/tauri-output.zip
179
+ #./gradlew publishClientPublicationToMavenLocal -Prelease_version=$RELEASE_VERSION -Partifact_id=${id_base}-win-electron -Partifact_path=${path_base}-windows/electron-output.zip
180
+ #./gradlew publishClientPublicationToMavenLocal -Prelease_version=$RELEASE_VERSION -Partifact_id=${id_base}-mac-electron -Partifact_path=${path_base}-macos/electron-output.zip
181
+ ./gradlew publishClientPublicationToMavenLocal -Prelease_version=$RELEASE_VERSION -Partifact_id=${id_base}-linux-electron -Partifact_path=${path_base}-linux/electron-output.zip
208
182
209
- - name : Upload specs
210
- run : gsutil -m rsync -a $OBJECT_ACL -r ./specs gs://$GCS_BUCKET/specs/$RELEASE_ARTIFACT_ID/$RELEASE_VERSION
183
+ - name : Upload maven artifacts to remote repository
184
+ run : gsutil -m rsync -a $OBJECT_ACL -r $HOME/.m2/repository/org/battlecode gs://$GCS_BUCKET/maven/org/battlecode
211
185
212
186
- name : Upload web client
213
187
run : |
214
- gsutil -m rsync -r -a $OBJECT_ACL ./artifacts/ client-dist gs://$GCS_BUCKET/client/$RELEASE_ARTIFACT_ID /$RELEASE_VERSION
215
- working-directory : ./client
188
+ gsutil -m rsync -r -a $OBJECT_ACL ./client-dist gs://$GCS_BUCKET/client/$CLIENT_ARTIFACT_ID /$RELEASE_VERSION
189
+ working-directory : ./client/artifacts
0 commit comments