This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
forked from ankitects/anki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to build desktop web/buildinfo artifacts
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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 | ||
chmod +x bazel | ||
export PATH=$(pwd):"$PATH" | ||
./tools/build-ankidroid-artifacts.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: anki_artifacts | ||
if-no-files-found: error | ||
path: anki_artifacts.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
bazel build buildinfo.txt ts/... | ||
rm -rf droid | ||
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 | ||
cd droid | ||
chmod -R a+w * | ||
zip -r ../anki_artifacts.zip * | ||
|