Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
Add script to build desktop web/buildinfo artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Jun 21, 2022
1 parent 665d81c commit f0652ab
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/anki_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build web/build artifacts from upstream
on:
workflow_dispatch:
push:
schedule:
- cron: "0 0 * * *"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 80
steps:
- uses: actions/checkout@v2

# todo: cache bazel folder

- name: Build artifacts
run: |
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-linux-amd64 -o ./bazel

This comment has been minimized.

Copy link
@mikehardy

mikehardy Jun 21, 2022

Member

is there a reason v.1.11.0 (included in the virtual environments already) is not welcome vs 1.10.1 ?
https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#tools

This comment has been minimized.

Copy link
@dae

dae Jun 21, 2022

Author

Nope, if one already exists that's even better

chmod +x bazel
./tools/build-ankidroid-artifacts.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: anki_artifacts
if-no-files-found: error
path: droid
8 changes: 8 additions & 0 deletions tools/build-ankidroid-artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

bazel build buildinfo.txt ts/...
mkdir -p droid/web
rsync -a .bazel/bin/buildinfo.txt droid
for i in card-info graphs deck-options change-notetype congrats; do
cp -av .bazel/bin/ts/$i/$i.{html,js,css} droid/web/
done

0 comments on commit f0652ab

Please sign in to comment.