mirror of
https://github.com/ThisIsDara/mhr-cfw-go.git
synced 2026-05-18 23:54:36 +03:00
42 lines
893 B
YAML
42 lines
893 B
YAML
name: Build and Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
|
|
- name: Build
|
|
run: go build -ldflags "-s -w" -o mhr-cfw-go.exe ./cmd/mhr-cfw
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: mhr-cfw-go
|
|
path: mhr-cfw-go.exe
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: mhr-cfw-go
|
|
path: .
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: mhr-cfw-go.exe
|
|
body: "Built from commit ${{ github.sha }}"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |