From 0ba8c1e8071ffe79c2a0e16ff7de3975f42f2929 Mon Sep 17 00:00:00 2001 From: Paolo Dettori Date: Fri, 9 Jun 2023 21:08:16 -0400 Subject: [PATCH 1/2] update options goreleaser Signed-off-by: Paolo Dettori --- .github/workflows/goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 63c7f7e..0844ab8 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -34,7 +34,7 @@ jobs: with: distribution: goreleaser version: latest - args: release --timeout 60m -clean + args: release --timeout 60m --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # - name: Run GoReleaser on pull request From cc5e72e7bdc9fcd5a67138069ffddb3c11eb410a Mon Sep 17 00:00:00 2001 From: Paolo Dettori Date: Fri, 9 Jun 2023 22:10:08 -0400 Subject: [PATCH 2/2] add ko to goreleaser Signed-off-by: Paolo Dettori --- .github/workflows/goreleaser.yml | 20 +--------------- .github/workflows/kflex-operator-image.yaml | 26 --------------------- .goreleaser.yaml | 17 +++++++++++++- 3 files changed, 17 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/kflex-operator-image.yaml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 0844ab8..d8222c1 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -1,10 +1,6 @@ name: goreleaser on: - # pull_request: - # paths: - # - .github/workflows/goreleaser.yml - # - .goreleaser.yaml push: tags: - 'v*' @@ -29,7 +25,6 @@ jobs: - name: Set LDFLAGS run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV - name: Run GoReleaser on tag - # if: github.event_name != 'pull_request' uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser @@ -37,17 +32,4 @@ jobs: args: release --timeout 60m --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - name: Run GoReleaser on pull request - # if: github.event_name == 'pull_request' - # uses: goreleaser/goreleaser-action@v4 - # with: - # distribution: goreleaser - # version: latest - # args: release --timeout 60m --snapshot - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - uses: cytopia/upload-artifact-retry-action@v0.1.7 - # if: ${{ always() }} - # with: - # name: binaries - # path: dist/*.tar.gz + diff --git a/.github/workflows/kflex-operator-image.yaml b/.github/workflows/kflex-operator-image.yaml deleted file mode 100644 index 319b081..0000000 --- a/.github/workflows/kflex-operator-image.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build KubeFlex Operator Image - -permissions: - packages: write - -on: - push: - branches: - - main - - 'release-*' - tags: - - 'v*' - -jobs: - syncer-image: - name: Build Syncer Image - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: v1.19 - - # Build and push multi-arch supported syncer image, tagged with the commit SHA and the branch name. - - uses: imjasonh/setup-ko@v0.6 - - run: ko publish -B ./cmd/manager --platform linux/amd64,linux/ppc64le,linux/arm64 -t $(git rev-parse --short "$GITHUB_SHA"),${{ github.ref_name }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c876b5f..983332e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -19,7 +19,22 @@ archives: - id: kflex builds: - kflex +kos: + - main: ./cmd/manager + tags: + - '{{.Version}}' + - latest + bare: true + preserve_import_paths: false + ldflags: + - "{{ .Env.LDFLAGS }}" + platforms: + - linux/amd64 + - linux/arm64 + env: + - CGO_ENABLED=0 release: draft: false prerelease: auto - mode: keep-existing \ No newline at end of file + mode: keep-existing +