Skip to content

Commit

Permalink
Modified github action of release by tag to goreleaser (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
ak1ra24 committed Jan 17, 2024
1 parent 0868c4b commit 23b05fa
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions .github/workflows/release-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
name: release
name: release tag
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

- "v[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v2
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
env:
GO111MODULE: on
GOPATH: /home/runner/work/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go get -u github.com/x-motemen/gobump/cmd/gobump
go get -u github.com/tcnksm/ghr
go get -u github.com/Songmu/ghch/cmd/ghch
go get -u github.com/Songmu/goxz/cmd/goxz
export TAGNAME=$($GOPATH/bin/gobump show -r)
echo "DEBUG:" $TAGNAME
$GOPATH/bin/goxz -pv $TAGNAME -os=linux -arch=amd64 -d ./dist/v$TAGNAME
$GOPATH/bin/ghr -n=v$TAGNAME -b="$($GOPATH/bin/ghch -F markdown --latest)" -draft v$TAGNAME ./dist/v$TAGNAME
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.23.0
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 23b05fa

Please sign in to comment.