mirror of
https://github.com/koho/frpmgr.git
synced 2025-10-20 16:03:47 +08:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Releaser
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
Release:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@v3.0.0
|
|
with:
|
|
go-version: '1.20'
|
|
|
|
- name: Setup VS environment
|
|
shell: cmd
|
|
run: |
|
|
for /f "usebackq delims=" %%i in (`vswhere.exe -latest -property installationPath`) do echo %%i\VC\Auxiliary\Build>>%GITHUB_PATH%
|
|
|
|
- name: Build
|
|
id: build
|
|
shell: cmd
|
|
run: |
|
|
set GOPATH=%USERPROFILE%\go
|
|
echo ::set-output name=version::%GITHUB_REF:~11%
|
|
build.bat
|
|
|
|
- name: Upload Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./bin/frpmgr-${{ steps.build.outputs.version }}-Setup.exe
|
|
asset_name: frpmgr-${{ steps.build.outputs.version }}-Setup.exe
|
|
asset_content_type: application/octet-stream
|