-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (45 loc) · 1.57 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build example
on:
workflow_dispatch:
push:
branches:
- main
tags:
- 0.*
- 1.*
pull_request:
branches:
- main
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
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 foo@bar.com --auth 12345 --texture-compression true --bundle-output build/bundle/js-web --platform js-web --archive --variant release resolve build bundle
- name: Upload Result
uses: actions/upload-artifact@v4
with:
name: bundle
path: build/bundle/js-web/sharp_sprite
- name: Deploy to Pages 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build/bundle/js-web/sharp_sprite