Skip to content

Commit 08975d4

Browse files
committed
Commit preparation to merge into 4.3-beta.
1 parent 2d269de commit 08975d4

File tree

8 files changed

+68
-60
lines changed

8 files changed

+68
-60
lines changed

.github/workflows/spine-construct3-temp.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/spine-ts.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ jobs:
1919
working-directory: spine-ts
2020
env:
2121
TS_UPDATE_URL: ${{secrets.TS_UPDATE_URL}}
22-
run: ./build.sh
22+
run: ./build.sh
23+
- name: Deploy spine-construct3
24+
working-directory: spine-ts
25+
env:
26+
C3_UPDATE_URL: ${{secrets.C3_UPDATE_URL}}
27+
run: ./spine-construct3/build.sh

spine-ts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ up into multiple modules:
1414
1. `spine-phaser-v4/`, a [Phaser v4](https://phaser.io/) backend, built on the core classes.
1515
1. `spine-pixi-v7/`, a [PixiJS v7](https://pixijs.com/) backend, built on the core classes.
1616
1. `spine-pixi-v8/`, a [PixiJS v8](https://pixijs.com/) backend, built on the core classes.
17+
1. `spine-construct3/`, the official [Construct 3](https://www.construct.net/) plugin, built on the core classes.
1718

1819
In most cases, the `spine-player` module is best suited for your needs. Please refer to the [Spine Web Player documentation](https://esotericsoftware.com/spine-player) for more information.
1920

spine-ts/publish.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ packages=(
3030
"spine-threejs/package.json"
3131
"spine-webgl/package.json"
3232
"spine-webcomponents/package.json"
33+
"spine-construct3/package.json"
34+
"spine-construct3/spine-construct3-lib/package.json"
35+
"spine-construct3/src/addon.json"
3336
)
3437

3538
for package in "${packages[@]}"; do

spine-ts/spine-construct3/build.sh

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,52 +15,71 @@ fi
1515
# Get the latest commit message
1616
COMMIT_MSG=$(git log -1 --pretty=%B)
1717

18-
log_title "Spine-Construct3 Build"
18+
log_title "Spine-Construct3 Deploy"
1919
log_detail "Branch: $BRANCH"
2020

21-
log_action "Installing dependencies"
22-
pushd ".." > /dev/null
23-
if npm install > /tmp/npm-install.log 2>&1; then
21+
# Only deploy if the commit message matches [ts] Release x.y.z
22+
if ! echo "$COMMIT_MSG" | grep -qE '^\[ts\] Release [0-9]+\.[0-9]+\.[0-9]+$'; then
23+
log_warn "Commit is not a release - skipping deploy"
24+
log_detail "To deploy, commit message must be: \"[ts] Release x.y.z\""
25+
log_summary "Deploy skipped"
26+
exit 0
27+
fi
28+
29+
VERSION=$(echo "$COMMIT_MSG" | sed -E 's/^\[ts\] Release ([0-9]+\.[0-9]+\.[0-9]+)$/\1/')
30+
log_detail "Version: $VERSION"
31+
32+
if [ -z "$C3_UPDATE_URL" ] || [ -z "$BRANCH" ]; then
33+
log_skip "Deployment skipped (C3_UPDATE_URL and/or BRANCH not set)"
34+
log_summary "✓ Deploy skipped"
35+
exit 0
36+
fi
37+
38+
log_action "Creating .c3addon"
39+
pushd "dist" > /dev/null
40+
if ZIP_OUTPUT=$(zip -r ../EsotericSoftware_SpineConstruct3.c3addon ./* 2>&1); then
2441
log_ok
2542
else
2643
log_fail
27-
log_error_output "$(cat /tmp/npm-install.log)"
44+
log_error_output "$ZIP_OUTPUT"
2845
exit 1
2946
fi
3047
popd > /dev/null
3148

32-
# Public only if the commit message is in the correct format
33-
if ! [ -z "$C3_UPDATE_URL" ] && ! [ -z "$BRANCH" ];
34-
then
35-
log_action "Creating artifacts zip"
36-
pushd "dist" > /dev/null
37-
if ZIP_OUTPUT=$(zip -r ../EsotericSoftware_SpineConstruct3.c3addon ./* 2>&1); then
38-
log_ok
39-
popd > /dev/null
40-
if ZIP_OUTPUT=$(zip spine-construct3.zip EsotericSoftware_SpineConstruct3.c3addon 2>&1); then
41-
log_ok
42-
else
43-
log_fail
44-
log_error_output "$ZIP_OUTPUT"
45-
exit 1
46-
fi
47-
else
48-
log_fail
49-
log_error_output "$ZIP_OUTPUT"
50-
exit 1
51-
fi
49+
log_action "Creating versioned zip: spine-construct3-$VERSION.zip"
50+
if ZIP_OUTPUT=$(zip "spine-construct3-$VERSION.zip" EsotericSoftware_SpineConstruct3.c3addon 2>&1); then
51+
log_ok
52+
else
53+
log_fail
54+
log_error_output "$ZIP_OUTPUT"
55+
exit 1
56+
fi
5257

53-
log_action "Uploading to $C3_UPDATE_URL$BRANCH"
54-
if CURL_OUTPUT=$(curl -f -F "file=@spine-construct3.zip" "$C3_UPDATE_URL$BRANCH" 2>&1); then
55-
log_ok
56-
else
57-
log_fail
58-
log_error_output "$CURL_OUTPUT"
59-
exit 1
60-
fi
58+
log_action "Creating latest zip: spine-construct3.zip"
59+
if CP_OUTPUT=$(cp "spine-construct3-$VERSION.zip" spine-construct3.zip 2>&1); then
60+
log_ok
61+
else
62+
log_fail
63+
log_error_output "$CP_OUTPUT"
64+
exit 1
65+
fi
6166

62-
log_summary "✓ Build and deployment successful"
67+
log_action "Uploading spine-construct3-$VERSION.zip to $C3_UPDATE_URL$BRANCH"
68+
if CURL_OUTPUT=$(curl -f -F "file=@spine-construct3-$VERSION.zip" "$C3_UPDATE_URL$BRANCH" 2>&1); then
69+
log_ok
6370
else
64-
log_skip "Deployment skipped (C3_UPDATE_URL and/or BRANCH not set)"
65-
log_summary "✓ Build successful"
71+
log_fail
72+
log_error_output "$CURL_OUTPUT"
73+
exit 1
6674
fi
75+
76+
log_action "Uploading spine-construct3.zip (latest) to $C3_UPDATE_URL$BRANCH"
77+
if CURL_OUTPUT=$(curl -f -F "file=@spine-construct3.zip" "$C3_UPDATE_URL$BRANCH" 2>&1); then
78+
log_ok
79+
else
80+
log_fail
81+
log_error_output "$CURL_OUTPUT"
82+
exit 1
83+
fi
84+
85+
log_summary "✓ Construct3 plugin $VERSION deployed successfully"

spine-ts/spine-construct3/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@esotericsoftware/spine-construct3",
3+
"private": true,
34
"version": "4.2.82",
45
"description": "The official Spine Runtimes for Construct3",
56
"main": "dist/plugin.js",

spine-ts/spine-construct3/spine-construct3-lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@esotericsoftware/spine-construct3-lib",
3+
"private": true,
34
"version": "4.2.82",
45
"description": "The official Spine Runtimes for the web.",
56
"main": "dist/index.js",

spine-ts/spine-construct3/src/addon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "plugin",
88
"name": "Spine Construct3",
99
"id": "EsotericSoftware_SpineConstruct3",
10-
"version": "4.3.0-beta",
10+
"version": "4.2.82",
1111
"author": "Esoteric Software",
1212
"website": "https://www.esotericsoftware.com",
1313
"documentation": "https://www.esotericsoftware.com",

0 commit comments

Comments
 (0)