Skip to content

Commit

Permalink
Add build-windows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyxtyx committed Nov 7, 2024
1 parent 0ff59cc commit 8866b06
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
workflow_dispatch:
inputs:
skip_release:
description: "Skip release related steps? (true/false)"
required: true
default: "false"

env:
version: m126-6bfb13368b

jobs:
windows:
runs-on: windows-2019
strategy:
matrix:
build_type: [Debug, Release]
machine: ["x64", "arm64"]
fail-fast: false
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- shell: bash
run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --target windows --machine ${{ matrix.machine }}
if: ${{ github.event.inputs.skip_release != 'true' && github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: microsoft/setup-msbuild@v1
- uses: ilammy/msvc-dev-cmd@v1
- shell: bash
run: python3 script/checkout.py --version ${{ env.version }}
- shell: bash
run: python3 script/build.py --build-type ${{ matrix.build_type }} --target windows --machine ${{ matrix.machine }}
- shell: bash
run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --target windows --machine ${{ matrix.machine }}
- uses: actions/upload-artifact@v3
if: ${{ github.event.inputs.skip_release != 'true' && github.ref == 'refs/heads/main' }}
with:
name: Skia-${{ env.version }}-windows-${{ matrix.build_type }}-${{ matrix.machine }}.zip
path: "*.zip"
- shell: bash
run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --target windows --machine ${{ matrix.machine }}
if: ${{ github.event.inputs.skip_release != 'true' && github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8866b06

Please sign in to comment.