mirror of https://github.com/status-im/consul.git
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: reusable-dev-build-windows
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
uploaded-binary-name:
|
|
required: false
|
|
type: string
|
|
default: "consul.exe"
|
|
runs-on:
|
|
description: An expression indicating which kind of runners to use.
|
|
required: true
|
|
type: string
|
|
repository-name:
|
|
required: true
|
|
type: string
|
|
go-arch:
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
go-version:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
elevated-github-token:
|
|
required: true
|
|
jobs:
|
|
build:
|
|
runs-on: 'windows-2019'
|
|
steps:
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
|
|
- name: Setup Git
|
|
if: ${{ endsWith(inputs.repository-name, '-enterprise') }}
|
|
run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com"
|
|
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
|
with:
|
|
go-version: ${{ inputs.go-version }}
|
|
- name: Build
|
|
env:
|
|
GOARCH: ${{ inputs.goarch }}
|
|
run: go build .
|
|
# save dev build to pass to downstream jobs
|
|
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
with:
|
|
name: ${{inputs.uploaded-binary-name}}
|
|
path: consul.exe
|