Skip to content

Commit

Permalink
Merge pull request #4 from witnesschain-com/deployments/binary
Browse files Browse the repository at this point in the history
Deployments/binary
  • Loading branch information
Aswin-ElMagnifico authored Jul 17, 2024
2 parents 70225e3 + a1f9272 commit f07224c
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cli_bin.yml
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}}
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Initial release
> cli for DCl operator

0 comments on commit f07224c

Please sign in to comment.