Skip to content

Commit

Permalink
add release and release-pre workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
catfishlty committed Jan 26, 2022
1 parent e022bb3 commit 7d850b4
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 4 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release-pre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
push:
tags:
- "v*.*.*-pre"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build linux-arm
run: GOOS=linux GOARCH=arm go build -o mlb-linux-arm cmd/mlb/main.go
- name: Build linux-arm64
run: GOOS=linux GOARCH=arm64 go build -o mlb-linux-arm64 cmd/mlb/main.go
- name: Build linux-386
run: GOOS=linux GOARCH=386 go build -o mlb-linux-386 cmd/mlb/main.go
- name: Build linux-amd64
run: GOOS=linux GOARCH=amd64 go build -o mlb-linux-amd64 cmd/mlb/main.go
- name: Build darwin-arm64
run: GOOS=darwin GOARCH=arm64 go build -o mlb-darwin-arm64 cmd/mlb/main.go
- name: Build darwin-amd64
run: GOOS=darwin GOARCH=amd64 go build -o mlb-darwin-amd64 cmd/mlb/main.go
- name: Build windows-arm
run: GOOS=windows GOARCH=arm go build -o mlb-windows-arm.exe cmd/mlb/main.go
- name: Build darwin-arm64
run: GOOS=windows GOARCH=arm64 go build -o mlb-windows-arm64.exe cmd/mlb/main.go
- name: Build windows-386
run: GOOS=windows GOARCH=386 go build -o mlb-windows-386.exe cmd/mlb/main.go
- name: Build windows-amd64
run: GOOS=windows GOARCH=amd64 go build -o mlb-windows-amd64.exe cmd/mlb/main.go
- name: List
run: ls -al

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
files: |
mlb-linux-arm
mlb-linux-arm64
mlb-linux-386
mlb-linux-amd64
mlb-darwin-arm64
mlb-darwin-amd64
mlb-windows-arm.exe
mlb-windows-arm64.exe
mlb-windows-386.exe
mlb-windows-amd64.exe
LICENSE
body_path: CHANGELOG.txt
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
prerelease: false
files: |
mlb-linux-arm
mlb-linux-arm64
Expand Down
5 changes: 2 additions & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
v0.5.0-pre
1. fix document[EN]
2. Github Action
2. Github Actions
3. CircleCI
4. CodeCov
5. Goreport
6. fix command execute error handle logic
7. auto release workflow - test
7. auto release workflow

0 comments on commit 7d850b4

Please sign in to comment.