Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,35 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: tunnel-jar
path: target/TestingBotTunnel-*.jar
path: target/TestingBotTunnel-*.jar
# The self-contained distributions are otherwise only built by release.yml, on a
# tag -- after Maven Central has already published. The Windows leg had never
# passed there: dist/archive.sh called `zip`, which Git Bash on the runners lacks,
# and nothing before the 5.0 tag could have said so. Linux and Windows cover the
# two launchers and both archive formats; macOS adds signing, which needs secrets
# a pull request does not get.
runtime:
needs: test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Set up JDK 17
uses: actions/setup-java@v6.0.1
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Build JAR
shell: bash
run: mvn -B -DskipTests package
- name: Build self-contained runtime
shell: bash
run: dist/build-runtime.sh
- name: Verify runtime
shell: bash
run: dist/verify-runtime.sh "$(ls -d dist/testingbot-tunnel-*/ | head -1)"
10 changes: 9 additions & 1 deletion dist/archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ checksum() {
case "$NAME" in
*windows*)
rm -f "$NAME.zip"
zip -qr "$NAME.zip" "$NAME"
# Git Bash on the Windows runners has no zip; 7-Zip is preinstalled there instead.
if command -v zip >/dev/null 2>&1; then
zip -qr "$NAME.zip" "$NAME"
elif command -v 7z >/dev/null 2>&1; then
7z a -tzip -bso0 -bsp0 "$NAME.zip" "$NAME"
else
echo " !! neither zip nor 7z found; dist/$NAME.zip not written" >&2
exit 1
fi
echo " -> dist/$NAME.zip"
checksum "$NAME.zip"
;;
Expand Down
Loading