generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add release flow Signed-off-by: zeroalphat <[email protected]> --------- Signed-off-by: zeroalphat <[email protected]>
- Loading branch information
1 parent
ab536a4
commit 36a2ca4
Showing
6 changed files
with
159 additions
and
80 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,30 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
- ci | ||
- documentation | ||
- refactoring | ||
- test | ||
categories: | ||
- title: Features | ||
labels: | ||
- enhancement | ||
- title: Bug Fixes | ||
labels: | ||
- bug | ||
- title: Deprecated | ||
labels: | ||
- deprecate | ||
- title: Removed | ||
labels: | ||
- remove | ||
- title: Security | ||
labels: | ||
- security | ||
- title: Dependencies | ||
labels: | ||
- dependencies | ||
- title: Others | ||
labels: | ||
- "*" |
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,49 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
image: | ||
name: Push Container Image | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: linux/amd64 | ||
- uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ inputs.github_token }} | ||
- name: Build necoperf-cli and necoperf-daemon image | ||
run: make docker-build | ||
- name: Push necoperf-cli and necoperf-daemon image | ||
run: | | ||
IMAGE_TAG=${GITHUB_REF#refs/tags/v} # Remove "v" prefix. | ||
docker tag necoperf-cli:dev ghcr.io/cybozu-go/necoperf-cli:$IMAGE_TAG | ||
docker push ghcr.io/cybozu-go/necoperf-cli:$IMAGE_TAG | ||
docker tag necoperf-daemon:dev ghcr.io/cybozu-go/necoperf-daemon:$IMAGE_TAG | ||
docker push ghcr.io/cybozu-go/necoperf-daemon:$IMAGE_TAG | ||
release: | ||
name: Release on GitHub | ||
needs: image | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
builds: | ||
- id: necoperf-cli | ||
main: ./cmd/necoperf-cli | ||
binary: necoperf-cli | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- id: necoperf-daemon | ||
main: ./cmd/necoperf-daemon | ||
binary: necoperf-daemon | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
archives: | ||
- id: necoperf-cli | ||
builds: [necoperf-cli] | ||
name_template: "necoperf-cli_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
wrap_in_directory: false | ||
format: tar.gz | ||
files: | ||
- LICENSE | ||
|
||
- id: necoperf-daemon | ||
builds: [necoperf-daemon] | ||
name_template: "necoperf-daemon_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
wrap_in_directory: false | ||
format: tar.gz | ||
files: | ||
- LICENSE | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
changelog: | ||
use: github-native | ||
|
||
release: | ||
github: | ||
owner: cybozu-go | ||
name: necoperf | ||
prerelease: auto | ||
name_template: "Release {{ .Tag }}" |
This file was deleted.
Oops, something went wrong.
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