Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xianhuawei authored Nov 6, 2023
1 parent e4439fc commit 11a7af2
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: wsctl release

on:
push:
tags:
- "v*"

jobs:
release_job:
name: Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: wsctl-linux-amd64
- os: windows-latest
artifact_name: wsctl-windows-amd64.exe
- os: macos-latest
artifact_name: wsctl-darwin-amd64

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19

- name: make pub_client
run: |
set CGO_ENABLED=1
set GOARCH=amd64
go build -o ./${{ matrix.artifact_name }} -v ./cmd/wsctl
- name: Upload to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./${{ matrix.artifact_name }}
asset_name: ${{ matrix.artifact_name }}
tag: ${{ github.ref }}

0 comments on commit 11a7af2

Please sign in to comment.