Skip to content

build-angle

build-angle #28

Workflow file for this run

name: build-angle
on:
schedule:
- cron: "0 0 * * 0"
push:
branches:
- main
jobs:
build-win:
name: Build (Windows)
strategy:
matrix:
os: [windows-2019] # could also add windows-2022
runs-on: ${{ matrix.os }}
env:
BUILD_OS: ${{ matrix.os }}
outputs:
ANGLE_COMMIT: ${{ steps.build.outputs.ANGLE_COMMIT }}
BUILD_DATE: ${{ steps.build.outputs.BUILD_DATE }}
steps:
- name: Check out
uses: actions/checkout@v2
- name: Build
id: build
shell: cmd
run: call build.cmd
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
path: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
if-no-files-found: error
build-mac:
name: Build (Mac)
strategy:
matrix:
os: [macos-11, macos-12, macos-13]
runs-on: ${{ matrix.os }}
env:
BUILD_OS: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v2
- name: Build
id: build
run: ./build.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
path: "angle-${{ matrix.os }}-${{ steps.build.outputs.BUILD_DATE }}.zip"
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs:
- build-win
- build-mac
steps:
- name: Check out
uses: actions/checkout@v2
- name: Download artifacts
uses: actions/[email protected]
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
assets=()
for asset_dir in ./angle-*.zip; do
for asset in $asset_dir/*; do
assets+=("-a" "$asset")
done
done
tag_name="${{ needs.build-win.outputs.BUILD_DATE }}"
hub release create "${assets[@]}" -m "$tag_name" -m "Angle commit: [${{ needs.build-win.outputs.ANGLE_COMMIT }}](https://github.com/google/angle/commit/${{ needs.build-win.outputs.ANGLE_COMMIT }})" "$tag_name"