Skip to content

Commit 95c6453

Browse files
committed
ci: make prerelease publishing reliable on hosted runners
1 parent 8d53b1d commit 95c6453

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,24 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v5
11+
- uses: actions/setup-node@v7
12+
with:
13+
node-version: '24'
14+
package-manager-cache: false
1115
- name: Install Unity Package Manager CLI
1216
run: |
13-
curl -fsSL https://cdn.packages.unity.com/upm-cli/install.sh | bash
17+
installer="$RUNNER_TEMP/install-upm.sh"
18+
curl --retry 3 --retry-all-errors --retry-delay 2 -fsSL \
19+
https://cdn.packages.unity.com/upm-cli/install.sh -o "$installer"
20+
for attempt in 1 2 3; do
21+
if bash "$installer"; then
22+
break
23+
fi
24+
if [ "$attempt" -eq 3 ]; then
25+
exit 1
26+
fi
27+
sleep 5
28+
done
1429
echo "$HOME/.upm/bin" >> "$GITHUB_PATH"
1530
"$HOME/.upm/bin/upm" --version
1631
- name: Pack and sign
@@ -29,7 +44,7 @@ jobs:
2944
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
3045
package_tgz="$(find "$RUNNER_TEMP/signed-package" -maxdepth 1 -name '*.tgz' -print -quit)"
3146
test -n "$package_tgz"
32-
npm publish "$package_tgz" --registry=https://registry.visualpinball.org/
47+
npm publish "$package_tgz" --registry=https://registry.visualpinball.org/ --tag latest
3348
env:
3449
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3550

0 commit comments

Comments
 (0)