feat: implement release workflow and add license file

This commit is contained in:
2023-10-31 07:34:47 +03:00
parent 8cc80f41fc
commit b460788b42
2 changed files with 66 additions and 0 deletions

45
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Create Release and Publish
on:
push:
tags:
- 'v*'
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
releases-matrix:
name: Release Binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/go-release-action@v1.40
with:
github_token: ${{ secrets.PUBLISHER_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: http-proxy-server
ldflags: -s -w
executable_compression: upx --ultra-brute
extra_files: LICENSE