forked from easegress-io/easegress
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify github test actions and add release action (easegress-io#433)
* modify github test actions and add release action * write down the steps to release new version * Update doc/reference/maintain.md Co-authored-by: Bomin Zhang <[email protected]> Co-authored-by: Bomin Zhang <[email protected]>
- Loading branch information
Showing
4 changed files
with
103 additions
and
3 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,85 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- name: Set up Go 1.x.y | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16.5 | ||
|
||
- name: Checkout codebase | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
shell: bash | ||
run: | | ||
make test TEST_FLAGS="-race -covermode=atomic" | ||
test-win: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Set up Go 1.x.y | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16.5 | ||
|
||
- name: Checkout codebase | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
go mod verify | ||
go mod download | ||
go test -v ./... | ||
integration-test-ubuntu: | ||
needs: [test, test-win] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Set up Go 1.x.y | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16.5 | ||
|
||
- name: Checkout codebase | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
make httpserver_test | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
needs: integration-test-ubuntu | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Release steps | ||
|
||
These are the steps to release new version of Easegress. | ||
|
||
## Pre-requisites | ||
|
||
Let's suppose that the next version is `X.Y.Z`. Then new *tag* is `vX.Y.Z` (note prefix `v`) and new *release title* is `easegress-vX.Y.Z`. Please collect all Pull Request's that will be mentioned in `CHANGELOG.md` and in the Release Note. | ||
|
||
## Steps | ||
|
||
1. Create a Pull Request that updates release version `X.Y.Z` in Makefile and adds the new version to `CHANGELOG.md`. Include significant changes, implemented enchantments and fixed bugs to `CHANGELOG.md`. Once the PR is reviewed and approved, merge it to main branch. | ||
2. Create new release note at https://github.com/megaease/easegress/releases/new with *release title* `easegress-vX.Y.Z` and click `Save draft`. Click *Choose a tag* and add new tag `vX.Y.Z`. Write the Release note. You can use the modifications written to `CHANGELOG.md` in previous step. Follow the same format, as previous Release notes. Once written, click `Publish release`. | ||
3. New tag triggers Goreleaser Github action. Follow up that it creates and uploads successfully all binaries and Docker images. | ||
4. Ensure that the release note created in step 2 contains the command to pull the new Docker image. | ||
5. New version of Easegress is now released! Notify everyone to check it out! |