Revert "Update sdk url" #54
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build demo.zip | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
tags: | |
- 0.* | |
- 1.* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Install Java ♨️ | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Build 🔧 | |
env: | |
DEFOLD_BOB_SHA1: ${{ vars.DEFOLD_BOB_SHA1 }} | |
run: | | |
lsb_release -a | |
mkdir -p build/bundle/public | |
# This demo doesn't implement Service Worker and Native Cache, so remove them from the settings: | |
sed -i 's/service_worker_url = .*//' game.project | |
sed -i 's/manifest_url = .*//' game.project | |
rm -rf example/bundle/web | |
BOB_SHA1=${DEFOLD_BOB_SHA1:-$(curl -s 'https://d.defold.com/stable/info.json' | jq -r .sha1)} | |
BOB_LOCAL_SHA1=$((java -jar build/bundle/bob.jar --version | cut -d' ' -f6) || true) | |
if [ "${BOB_LOCAL_SHA1}" != "${BOB_SHA1}" ]; then wget --progress=dot:mega -O build/bundle/bob.jar "https://d.defold.com/archive/${BOB_SHA1}/bob/bob.jar"; fi | |
java -jar build/bundle/bob.jar --version | |
java -jar build/bundle/bob.jar --email [email protected] --auth 12345 --texture-compression true --bundle-output build/bundle/js-web --platform js-web --archive --variant release resolve build bundle | |
(cd build/bundle/js-web/* && zip -r ../../public/demo_no-sw_no-native-cache.zip .) | |
- name: Upload Result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle | |
path: build/bundle/public/demo_no-sw_no-native-cache.zip | |
- name: Deploy to Pages 🚀 | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: build/bundle/public |