Skip to content

Commit 3bfc84e

Browse files
authored
Merge pull request #2937 from camilamacedo86/goreleaser
🌱 fix release by adding github action
2 parents 79bcf97 + edd9090 commit 3bfc84e

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
goreleaser:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Fetch all tags
16+
run: git fetch --force --tags
17+
- name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: '~1.19'
21+
- name: Run GoReleaser
22+
uses: goreleaser/goreleaser-action@v2
23+
with:
24+
version: v1.11.2
25+
args: release -f ./build/.goreleaser.yml --rm-dist
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Upload assets
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: kubebuilder
32+
path: dist/*
33+
if-no-files-found: error

RELEASE.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ the process was done to ensure that we have an aligned process under the org (si
2929
### Draft a new release from GitHub
3030

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

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

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

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

41-
1. Publish the new release on the Slack channel, i.e:
42+
1. Announce the new release on the Slack channel, i.e:
4243

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

50-
2. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] Kubebuilder $VERSION is released`
51+
2. Announce the new release via email is sent to `[email protected]` with the subject `[ANNOUNCE] Kubebuilder $VERSION is released`
5152

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

54-
As a workaround we can release from locally by:
55+
As a workaround we can release from locally by:
56+
57+
PS.: _This workaround uses the google cloud. Note that we move the binary CLI release from google cloud to use Github Actions instead_
5558

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

0 commit comments

Comments
 (0)