-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from witnesschain-com/deployments/binary
Deployments/binary
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
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,59 @@ | ||
name: Create Release | DCL Operator CLI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: Version of the release (eg. v1.0.0-beta, v1.1.2) | ||
required: true | ||
release_type: | ||
type: boolean | ||
description: Pre-release (set to true if there are strings in versions) | ||
default: false | ||
|
||
env: | ||
OPERATOR_CLI_DIR: ./dcl-operator | ||
CLI_NAME: "dcl-operator" | ||
CGO_ENABLED: 0 | ||
CLI_VERSION: ${{ github.event.inputs.version }} | ||
|
||
jobs: | ||
build-operator-cli: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
os-label: | ||
- linux_x86_64 | ||
- apple_silicon | ||
exclude: | ||
- os: ubuntu-latest | ||
os-label: apple_silicon | ||
- os: macos-latest | ||
os-label: linux_x86_64 | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.22.2" | ||
|
||
- name: Build for Dispatch | ||
working-directory: ${{ env.OPERATOR_CLI_DIR }} | ||
run: go build -o ${{env.CLI_NAME}}_${{matrix.os-label}} -ldflags "-X main.VERSION=${{ env.CLI_VERSION }}" . | ||
|
||
- name: List Output | ||
run: ls -ltr ${{ env.OPERATOR_CLI_DIR }} | ||
|
||
- name: GH Release | ||
uses: softprops/action-gh-release@v2.0.5 | ||
with: | ||
prerelease: ${{ github.event.inputs.release_type }} | ||
tag_name: ${{ env.CLI_VERSION }} | ||
body_path: RELEASE_NOTES.md | ||
files: ${{ env.OPERATOR_CLI_DIR }}/${{env.CLI_NAME}}_${{matrix.os-label}} |
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,2 @@ | ||
# Initial release | ||
> cli for DCl operator |