Build for windows #2
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: Build for windows | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: x64 | |
runner: windows-latest | |
- arch: ia32 | |
runner: windows-latest | |
- arch: arm64 | |
runner: windows-arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
# See: https://github.com/orgs/community/discussions/131594 | |
# The composite action requires bash which is not available on windows-arm64 runner. | |
# - uses: ./.github/util/initialize | |
# with: {github-token: "${{ github.token }}"} | |
- uses: dart-lang/setup-dart@v1 | |
- uses: bufbuild/buf-setup-action@v1.30.0 | |
with: {github_token: "${{ github.token }}"} | |
- name: Install Dependencies | |
run: dart pub get --verbose | |
- name: Compile Protobuf | |
run: dart run grinder protobuf | |
- name: Build | |
run: dart run grinder pkg-standalone-windows-${{ matrix.arch }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-windows-${{ matrix.arch }} | |
path: build/*.zip | |
if-no-files-found: error | |
compression-level: 0 |