Skip to content

Commit

Permalink
Merge pull request #2937 from camilamacedo86/goreleaser
Browse files Browse the repository at this point in the history
🌱 fix release by adding github action
  • Loading branch information
k8s-ci-robot committed Sep 20, 2022
2 parents 79bcf97 + edd9090 commit 3bfc84e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release
on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '~1.19'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: v1.11.2
args: release -f ./build/.goreleaser.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: kubebuilder
path: dist/*
if-no-files-found: error
11 changes: 7 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ the process was done to ensure that we have an aligned process under the org (si
### Draft a new release from GitHub

1. Create a new tag with the correct version from the new `release-<MAJOR.MINOR>` branch
2. Add the changelog on it and publish. Now, the code source is released !
2. Verify the Release Github Action. It should build the assets and publish in the draft release
3. You also need to manually add the changelog generated above on the release page and publish it. Now, the code source is released !

### Update the website docs (https://book.kubebuilder.io/quick-start.html)

Expand All @@ -38,7 +39,7 @@ the process was done to ensure that we have an aligned process under the org (si

### When the release be done and the website update: Announce the new release:

1. Publish the new release on the Slack channel, i.e:
1. Announce the new release on the Slack channel, i.e:

````
:announce: Kubebuilder v3.5.0 has been released!
Expand All @@ -47,11 +48,13 @@ For more info, see the release page: https://github.com/kubernetes-sigs/kubebuil
:tada: Thanks to all our contributors!
````

2. An announcement email is sent to `kubebuilder@googlegroups.com` with the subject `[ANNOUNCE] Kubebuilder $VERSION is released`
2. Announce the new release via email is sent to `kubebuilder@googlegroups.com` with the subject `[ANNOUNCE] Kubebuilder $VERSION is released`

## What to do if things goes wrong? How to release from my local env as a workaround?

As a workaround we can release from locally by:
As a workaround we can release from locally by:

PS.: _This workaround uses the google cloud. Note that we move the binary CLI release from google cloud to use Github Actions instead_

1. Download google container builder: https://github.com/GoogleCloudPlatform/cloud-build-local
2. Verify that you can use the cloud-build-local CLI tool
Expand Down

0 comments on commit 3bfc84e

Please sign in to comment.