Release v0.4.1 #138
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: Release | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-release | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v**" | |
branches: [master] | |
jobs: | |
build-checks: | |
uses: ./.github/workflows/build.yml | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
release-source: | |
needs: [build-checks] | |
name: release | |
runs-on: ubuntu-24.04 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install meson ninja | |
- name: Configure and build | |
run: | | |
meson setup build | |
meson dist -C build/ --allow-dirty --no-tests --include-subprojects | |
- name: Add artifact | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
./build/meson-dist/**/* | |
release-wasm: | |
needs: [build-checks] | |
name: make-wasm | |
runs-on: ubuntu-24.04 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
permissions: | |
contents: write | |
pages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: master | |
- name: Install dependencies | |
run: | | |
python3 -m pip install meson ninja | |
- name: Configure and build | |
run: | | |
meson setup --reconfigure build/ --buildtype=release --cross-file ./platforms/zig-wasm32.ini -Ddefault_library=static | |
meson compile vs.templ:executable -C build | |
- name: Add artifact | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
./build/vs.templ.js | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Build wasm-demo | |
run: | | |
cp -R examples ./dist/wasm-demo/static | |
cp ./build/vs.templ.js ./dist/wasm-demo/static | |
cd ./dist/wasm-demo | |
bun install | |
bun run build | |
- name: Deploy wasm-demo | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist/wasm-demo/build/ | |
destination_dir: wasm-demo | |
docs: | |
uses: ./.github/workflows/docs.yml | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
subdir: ${{github.ref_name}} | |
permissions: | |
contents: write | |
pages: write | |
docs-latest: | |
uses: ./.github/workflows/docs.yml | |
needs: [docs] | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
subdir: latest | |
permissions: | |
contents: write | |
pages: write |