Skip to content

Build and Test and Publish #25

Build and Test and Publish

Build and Test and Publish #25

Workflow file for this run

name: Build
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "19"
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v4
id: meta
with:
images: |
ghcr.io/${{ github.repository }}/builder
tags: |
type=raw,value=latest
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Cache source archive
uses: actions/cache@v3
with:
path: |
cache
prefix
wasm-build
key: archive-${{ github.sha }}
restore-keys: |
archive-
- name: Prepare container
uses: docker/build-push-action@v4
with:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build
run: |
docker run --name builder --rm -u emscripten -v "$(pwd):/src" -w /src ghcr.io/${{ github.repository }}/builder:latest /src/scripts/ci.sh
- name: Create package tarball
run: |
corepack yarn install
corepack yarn pack -o libxmlwasm.tgz
- name: Upload package tarball
uses: actions/upload-artifact@v3
with:
name: libxmlwasm.tgz
path: libxmlwasm.tgz