blob: e7e736e054f56b7cf6bc7b5f287affe051d6b5cf [file]
name: release
on:
workflow_dispatch: {}
schedule:
- cron: '50 5 * * 2-6' # 05:50 UTC, Tue-Sat morning (21:50 PST / 22:50 PDT Mon-Fri night)
permissions:
contents: read
jobs:
build-wasm:
runs-on: ubuntu-latest
timeout-minutes: 15
outputs:
PKG_VERSION: ${{ steps.build.outputs.PKG_VERSION }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Build Emscripten Package
id: build
run: |
GITHUB_REPOSITORY="${{ github.repository }}" GITHUB_REF_NAME="${GITHUB_REF_NAME}" .github/workflows/package-emdawnwebgpu.sh
- name: Upload WASM Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: emdawnwebgpu
path: |
${{ steps.build.outputs.REMOTE_PORT_FILE }}
${{ steps.build.outputs.PKG_FILE }}
RELEASE_INFO.md
build-native:
uses: ./.github/workflows/ci.yml
publish:
needs: [build-wasm, build-native]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download All Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: artifacts
- name: Display Downloaded Files
run: |
mv artifacts/emdawnwebgpu/RELEASE_INFO.md .
ls -R artifacts
- name: Upload to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ needs.build-wasm.outputs.PKG_VERSION }}
run: |
gh release create "$TAG_NAME" \
--title "$TAG_NAME" \
--notes-file RELEASE_INFO.md \
artifacts/Dawn-*/Dawn-*.tar.gz \
artifacts/dawn-android-*/dawn-android-*.tar.gz \
artifacts/dawn-apple-*/dawn-apple-*.xcframework.tar.gz \
artifacts/dawn-headers-*/dawn-headers-*.tar.gz \
artifacts/emdawnwebgpu/*
alert-on-failure:
needs: publish
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Alert on failure
run: |
curl -X POST \
-H 'Content-Type: application/json; charset=UTF-8' \
-d '{"text": "Release failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}' \
'${{secrets.GARDENING_CHAT_WEBHOOK_URL}}'