-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
.github/workflows/build-windows-github-release-artifacts.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "Build Windows Github Release Artifacts" | ||
|
||
on: | ||
# Development only | ||
# TODO: remove this | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
inputs: | ||
release_branch: | ||
description: "Git branch to checkout." | ||
required: true | ||
default: "master" | ||
type: string | ||
version_tag: | ||
description: "Version to tag release artifacts." | ||
required: true | ||
type: string | ||
workflow_call: | ||
inputs: | ||
release_branch: | ||
description: "Git branch to checkout." | ||
required: true | ||
type: string | ||
version_tag: | ||
description: "Version to tag release artifacts." | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.release_branch }} | ||
# We need to fetch git tags to obtain the latest version tag to report | ||
# the version of the running binary. | ||
fetch-depth: 0 | ||
|
||
- name: Install bazelisk | ||
run: | | ||
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-windows-amd64.exe" | ||
mkdir -p "${GITHUB_WORKSPACE}\bin\" | ||
mv bazelisk-windows-amd64.exe "${GITHUB_WORKSPACE}\bin\bazel.exe" | ||
- name: Build and Upload Artifacts | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
"${GITHUB_WORKSPACE}\bin\bazel.exe" build --config=release --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_ORG_API_KEY }} //enterprise/server/cmd/executor:executor | ||
# cp bazel-bin/server/cmd/**/**/buildbuddy buildbuddy-linux-amd64 | ||
# cp bazel-bin/enterprise/server/cmd/**/**/buildbuddy buildbuddy-enterprise-linux-amd64 | ||
# cp bazel-bin/enterprise/server/cmd/**/**/executor executor-enterprise-linux-amd64 | ||
# gh release upload ${{ inputs.version_tag }} buildbuddy-linux-amd64 buildbuddy-enterprise-linux-amd64 executor-enterprise-linux-amd64 --clobber |