-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2289 from kubernetes-sigs/release
🌱 Automate the release process
- Loading branch information
Showing
4 changed files
with
86 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
permissions: | ||
contents: write # Allow to create a release. | ||
|
||
jobs: | ||
build: | ||
name: create draft release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set env | ||
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV | ||
- name: checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Calculate go version | ||
run: echo "go_version=$(make go-version)" >> $GITHUB_ENV | ||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # tag=v5.1.0 | ||
with: | ||
go-version: ${{ env.go_version }} | ||
- name: generate release artifacts | ||
run: | | ||
make release | ||
- name: generate release notes | ||
# Ignore failures for release-notes generation so they could still get | ||
# generated manually before publishing. | ||
run: | | ||
make generate-release-notes || echo "Failed to generate release notes" >> _releasenotes/${{ env.RELEASE_TAG }}.md | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Release | ||
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # tag=v2.1.0 | ||
with: | ||
draft: true | ||
files: out/* | ||
body_path: _releasenotes/${{ env.RELEASE_TAG }}.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters