Skip to content

Commit

Permalink
feat: Build learn-ocaml-www.zip (learn-ocaml --contents-dir=www`) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmd committed Mar 4, 2022
1 parent 9651160 commit e36d874
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Expand Up @@ -66,6 +66,7 @@ jobs:
mv -v -- "$d/$b" "target/$b-$d-x86_64"
done
done
mv -v -- learn-ocaml-www.zip target/learn-ocaml-www.zip
- name: Add binaries to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/static-builds.yml
Expand Up @@ -12,6 +12,29 @@ on:
# test master every Saturday at 08:00 UTC
- cron: '0 8 * * 6'
jobs:
learn-ocaml-www-zip:
name: Build learn-ocaml-www.zip archive
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
strategy:
matrix:
archive: ["learn-ocaml-www.zip"]
# we could use an env var, albeit it would be less convenient
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Build learn-ocaml-compilation
run: 'docker build -t learn-ocaml-compilation --target=compilation .'
- name: Build ${{ matrix.archive }}
run: |
docker run -i --rm -w /home/opam/install-prefix/share/learn-ocaml -u 0 --entrypoint='' learn-ocaml-compilation sh -c \
'apk add --no-cache zip >&2 && zip -r ${{ matrix.archive }} www >&2 && tar c ${{ matrix.archive }}' | \
tar vx
- name: Upload ${{ matrix.archive }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.archive }}
path: ${{ matrix.archive }}
static-bin-linux:
name: Builds static Linux binaries
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
Expand Down

0 comments on commit e36d874

Please sign in to comment.