Skip to content

Commit

Permalink
Add GH release action
Browse files Browse the repository at this point in the history
  • Loading branch information
xuqingfeng committed Dec 15, 2023
1 parent 0b2dcbd commit 79d300e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/2-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- v*

jobs:
relese:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Install dependencies
run: go get .
- name: Run test
run: make test
- name: Build binary
run: make build-all
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
out/mailman-linux-amd64
out/mailman-linux-arm
out/mailman-darwin-amd64
out/mailman-windows-amd64.exe
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ build-all: fmt generate
GOOS=linux GOARCH=amd64 go build -ldflags "-w -s -X main.version=${VERSION}" -o out/mailman-linux-amd64 main.go && \
GOOS=linux GOARCH=arm go build -ldflags "-w -s -X main.version=${VERSION}" -o out/mailman-linux-arm main.go && \
GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s -X main.version=${VERSION}" -o out/mailman-darwin-amd64 main.go && \
GOOS=windows GOARCH=amd64 go build -ldflags "-w -s -X main.version=${VERSION}" -o out/mailman-windows-amd64.exe main.go && \
GOOS=windows GOARCH=amd64 go build -ldflags "-w -s -X main.version=${VERSION}" -o out/mailman-windows-amd64.exe main.go

0 comments on commit 79d300e

Please sign in to comment.