From 3a11b78f5162cce1f254b744e78ff002443acbc5 Mon Sep 17 00:00:00 2001 From: Andrey Pohilko Date: Mon, 22 Aug 2022 17:41:45 +0300 Subject: [PATCH] bootstrapping the CI --- .github/workflows/build.yml | 14 +------------- .goreleaser.yml | 22 ++++++++++++++++++++++ main.go | 5 +++++ 3 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4eef223..afd2c3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,23 +7,11 @@ on: branches: [ "main" ] jobs: - test: + build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - - name: Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master - with: - scan-type: "fs" - ignore-unfixed: true - format: "sarif" - output: "trivy-results.sarif" - severity: "CRITICAL" - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: "trivy-results.sarif" - name: Set up Go uses: actions/setup-go@v3 with: diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..cccf3a2 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,22 @@ +# .goreleaser.yml +# Build customization +builds: + - main: ./main.go + binary: helm-dashboard + ldflags: -s -w -X github.com/komodorio/helm-dashboard/main.version={{.Version}} -X github.com/komodorio/helm-dashboard/main.commit={{.Commit}} + goos: + - windows + - darwin + - linux + goarch: + - amd64 + - arm64 + env: + - CGO_ENABLED=0 +archives: + - id: helm-dashboard + format: tar.gz + replacements: + amd64: x86_64 + darwin: Darwin + linux: Linux \ No newline at end of file diff --git a/main.go b/main.go index c1356e9..53ba6a0 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,11 @@ import ( "net/http" ) +var ( + version = "dev" + commit = "dev" +) + func main() { go func() { err := webbrowser.Open("http://localhost:8080")