Files
mhr-cfw-go/.github/workflows/build.yml
T
2026-05-04 08:05:20 +03:30

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 }}