diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml new file mode 100644 index 00000000000..66ffd267daa --- /dev/null +++ b/.github/workflows/release-dev.yaml @@ -0,0 +1,57 @@ +name: Release kubectl-testkube dev + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+-*" + +jobs: + + # release_creation: + # name: Prepares Release on GitHub + # runs-on: ubuntu-latest + # outputs: + # id: ${{ steps.main_step.outputs.id }} + # steps: + # - name: Create Release + # id: main_step + # uses: actions/create-release@latest + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + # with: + # tag_name: ${{ github.ref }} + # release_name: testkube CLI ${{ github.ref }} + # body: | + # Changes in this Release + # - Releasing new version of the testkube CLI for Kubectl. + # draft: false + # prerelease: false + + release: + name: Create and upload release-artifacts + # needs: [release_creation] + runs-on: ubuntu-latest + + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist -f .goreleaser-dev.yml + env: + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + TELEMETRY_TOKEN: ${{ secrets.TELEMETRY_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5b6d9bf26e3..bc145ff4ad8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,9 +4,6 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - # need to be disabled because it overrides brew - # we must create separate (beta) brew tap and allow to build it - # - "v[0-9]+.[0-9]+.[0-9]+-*" jobs: diff --git a/.goreleaser-dev.yml b/.goreleaser-dev.yml new file mode 100644 index 00000000000..fc5ba7b6b8c --- /dev/null +++ b/.goreleaser-dev.yml @@ -0,0 +1,59 @@ +before: + hooks: + - go mod tidy +builds: + - main: ./cmd/kubectl-testkube + binary: kubectl-testkube + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + ldflags: + - -s -w -X main.version={{.Version}} + - -X main.commit={{.Commit}} + - -X main.date={{.Date}} + - -X main.builtBy=goreleaser + - -X github.com/kubeshop/testkube/pkg/telemetry.telemetryToken={{.Env.TELEMETRY_TOKEN}} +archives: + - replacements: + darwin: macOS + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: "checksums.txt" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" +release: + # Create a thread in the General category in the repo's discussion tab. + discussion_category_name: General + + # Tags that have the format v1.0.0-rc1 will mark the release as a pre-release (i.e. not ready for production) + # Other tags will be marked as ready for production + prerelease: auto + +brews: + - tap: + owner: kubeshop + name: homebrew-testkube-dev + description: Testkube - your somewhat opinionated and friendly Kubernetes testing framework! + homepage: https://testkube.io + license: "MIT" +snapcrafts: + - name: snap-testkube + description: Testkube - your somewhat opinionated and friendly Kubernetes testing framework! + license: "MIT" +nfpms: + - + maintainer: TestKube team + license: "MIT" + formats: + - deb +