diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 63c7f7e..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,25 +25,11 @@ 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 version: latest - args: release --timeout 60m -clean + 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 +