Skip to content

build-dawn

build-dawn #85

Workflow file for this run

name: build-dawn
on:
schedule:
- cron: "0 0 * * 0"
push:
branches:
- main
jobs:
info:
runs-on: ubuntu-24.04
outputs:
DAWN_COMMIT: ${{ steps.info.outputs.DAWN_COMMIT }}
BUILD_DATE: ${{ steps.info.outputs.BUILD_DATE }}
steps:
- name: Get Latest Commit Id
id: info
run: |
echo DAWN_COMMIT=`git ls-remote https://dawn.googlesource.com/dawn HEAD | awk '{ print $1 }'` >> ${GITHUB_OUTPUT}
echo BUILD_DATE=`date +'%Y-%m-%d'` >> ${GITHUB_OUTPUT}
build:
runs-on: windows-2022
needs: info
strategy:
matrix:
arch: [x64, arm64]
env:
DAWN_COMMIT: ${{ needs.info.outputs.DAWN_COMMIT }}
BUILD_DATE: ${{ needs.info.outputs.BUILD_DATE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Build Script
id: build
shell: cmd
run: call build.cmd ${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: dawn-${{ matrix.arch }}-${{ needs.info.outputs.BUILD_DATE }}
path: dawn-${{ matrix.arch }}-${{ needs.info.outputs.BUILD_DATE }}.zip
if-no-files-found: error
compression-level: 0
release:
runs-on: ubuntu-24.04
needs: [info, build]
permissions:
contents: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Create GitHub Release
run: |
echo '[dawn commit](https://dawn.googlesource.com/dawn/+/${{ needs.info.outputs.DAWN_COMMIT }})' >>notes.txt
gh release create ${{ needs.info.outputs.BUILD_DATE }} -R "${GITHUB_REPOSITORY}" -t '${{ needs.info.outputs.BUILD_DATE }}' -F notes.txt
- name: Get Artifacts From Build Steps
uses: actions/download-artifact@v4
with:
pattern: dawn-*-${{ needs.info.outputs.BUILD_DATE }}
merge-multiple: true
- name: Upload Artifacts to GitHub Release
run: gh release upload '${{ needs.info.outputs.BUILD_DATE }}' dawn-*-${{ needs.info.outputs.BUILD_DATE }}.zip -R "${GITHUB_REPOSITORY}"