-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.03 KB
/
autorelease.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Autorelease
on:
push:
branches:
- main
tags:
- '*'
jobs:
build-binary:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create relase
if: github.ref_type == 'tag'
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
- uses: actions/checkout@v2
- uses: actions/setup-go@v4.1.0
with:
go-version: '1.22'
- run: mkdir build -p && ls && pwd
- run: GOOS=windows GOARCH=amd64 go build -o build/ts-proxyd-windows-amd64.exe ./cmd/ts-proxyd
- run: go build -o build/ts-proxyd-linux-amd64 ./cmd/ts-proxyd
- uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/*
tag: ${{ github.ref_name }}
overwrite: true
file_glob: true