clash/.github/workflows/release.yaml

37 lines
808 B
YAML
Raw Normal View History

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