mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
* Chore: use Go v1.17 & support Windows ARM64 * Chore: update workflow
38 lines
864 B
YAML
38 lines
864 B
YAML
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
name: release-build
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.17"
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Checkout tag
|
|
run: |
|
|
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
tag_name="${GITHUB_REF##*/}"
|
|
echo Tag $tag_name
|
|
git checkout $tag_name
|
|
echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV
|
|
|
|
- name: Build
|
|
run: |
|
|
make release -j$(nproc)
|
|
|
|
- name: Release
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ env.TAG_NAME }}
|
|
file: ./trojan-go-*.zip
|
|
file_glob: true
|
|
prerelease: true
|