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
name: Build esbuild.wasm bundler WASM (WASI) Binary using Docker | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main", "dev" ] | |
schedule: | |
- cron: "0 0 1 * *" # minute hour dayofmonth month dayofweek, at least once a month | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
esbuildwasmbuild: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker container | |
run: docker build --tag esbuild-wasi . | |
- name: Run Docker Container to build esbuild | |
run: touch ${{ github.workspace }}/build/esbuild.wasm && docker run --rm -v ${{ github.workspace }}/build:/build esbuild-wasi | |
- name: Run compiled .wasm (trigger if no working .wasm binary present) | |
run: docker run --rm -v ${{ github.workspace }}/build:/build esbuild-wasi wasmtime /build/esbuild.wasm --help | |
- name: Upload artifact compiler, esbuild.wasm | |
uses: actions/upload-artifact@v4 | |
with: | |
name: esbuild.wasm | |
path: ${{ github.workspace }}/build/esbuild.wasm | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: false | |
draft: false | |
make_latest: true | |
name: autorelease | |
tag_name: autorelease | |
files: build/esbuild.wasm | |
fail_on_unmatched_files: true |