mihomo/.github/workflows/release.yaml

37 lines
808 B
YAML
Raw Normal View History

2022-05-02 00:59:41 +08:00
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
2022-11-02 22:13:54 +08:00
- name: Setup Go
uses: actions/setup-go@v3
2022-05-02 00:59:41 +08:00
with:
2023-02-02 15:39:57 +08:00
go-version: '1.20'
2022-11-02 22:13:54 +08:00
check-latest: true
cache: true
2022-05-02 00:59:41 +08:00
- name: Test
run: |
go test ./...
- name: Build
if: success()
env:
NAME: Clash.Meta
BINDIR: bin
2022-05-29 21:04:47 +08:00
run: make -j$(($(nproc) + 1)) releases
2022-05-02 00:59:41 +08:00
- 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