Skip to content

Commit e36d874

Browse files
authored
feat: Build learn-ocaml-www.zip (learn-ocaml --contents-dir=www`) (#469)
1 parent 9651160 commit e36d874

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
mv -v -- "$d/$b" "target/$b-$d-x86_64"
6767
done
6868
done
69+
mv -v -- learn-ocaml-www.zip target/learn-ocaml-www.zip
6970
- name: Add binaries to release
7071
env:
7172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/static-builds.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@ on:
1212
# test master every Saturday at 08:00 UTC
1313
- cron: '0 8 * * 6'
1414
jobs:
15+
learn-ocaml-www-zip:
16+
name: Build learn-ocaml-www.zip archive
17+
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
archive: ["learn-ocaml-www.zip"]
22+
# we could use an env var, albeit it would be less convenient
23+
steps:
24+
- name: Check out the repo
25+
uses: actions/checkout@v2
26+
- name: Build learn-ocaml-compilation
27+
run: 'docker build -t learn-ocaml-compilation --target=compilation .'
28+
- name: Build ${{ matrix.archive }}
29+
run: |
30+
docker run -i --rm -w /home/opam/install-prefix/share/learn-ocaml -u 0 --entrypoint='' learn-ocaml-compilation sh -c \
31+
'apk add --no-cache zip >&2 && zip -r ${{ matrix.archive }} www >&2 && tar c ${{ matrix.archive }}' | \
32+
tar vx
33+
- name: Upload ${{ matrix.archive }}
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: ${{ matrix.archive }}
37+
path: ${{ matrix.archive }}
1538
static-bin-linux:
1639
name: Builds static Linux binaries
1740
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}

0 commit comments

Comments
 (0)