mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
37 lines
808 B
YAML
37 lines
808 B
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '1.19'
|
|
check-latest: true
|
|
cache: true
|
|
|
|
- name: Test
|
|
run: |
|
|
go test ./...
|
|
- name: Build
|
|
if: success()
|
|
env:
|
|
NAME: Clash.Meta
|
|
BINDIR: bin
|
|
run: make -j$(($(nproc) + 1)) releases
|
|
|
|
- name: Upload Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: ${{ success() && startsWith(github.ref, 'refs/tags/')}}
|
|
with:
|
|
tag: ${{ github.ref }}
|
|
files: bin/*
|
|
generate_release_notes: true
|