-
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.
Signed-off-by: Viet-Anh Duong <vietanhs0817@gmail.com>
- Loading branch information
1 parent
f5165f7
commit a698f7c
Showing
3 changed files
with
54 additions
and
4 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,50 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-18.04 | ||
outputs: | ||
version_tag: ${{ steps.version_tag.outputs.value }} | ||
build_date: ${{ steps.build_date.outputs.value }} | ||
steps: | ||
- name: Format version tag | ||
shell: bash | ||
id: version_tag | ||
run: | | ||
TAG=${GITHUB_REF#refs/*/} | ||
echo "::set-output name=value::$TAG" | ||
- name: Build date | ||
shell: bash | ||
id: build_date | ||
run: echo "::set-output name=value::$(date +%FT%T%z)" | ||
|
||
release: | ||
needs: | ||
- prepare | ||
runs-on: ubuntu-18.04 | ||
env: | ||
VERSION_TAG: ${{ needs.prepare.outputs.version_tag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.18.x" | ||
|
||
- name: Release | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} |
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
Binary file not shown.