mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-07-04 18:30:17 +00:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Build and release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build and release
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
|
|
|
steps:
|
|
|
|
- name: Check out
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Get tag
|
|
uses: olegtarasov/get-tag@v2
|
|
id: tagName
|
|
|
|
- name: Get time
|
|
uses: gerred/actions/current-time@master
|
|
id: current-time
|
|
|
|
- name: Build
|
|
uses: tobyxdd/go-cross-build@e269fe09a60b9a6a7325cb06075e32ab1b7c2d12
|
|
env:
|
|
TIME: "${{ steps.current-time.outputs.time }}"
|
|
CGO_ENABLED: "0"
|
|
with:
|
|
name: hysteria
|
|
dest: ./dist/
|
|
ldflags: -w -s -X main.appVersion=${{ env.GIT_TAG_NAME }} -X main.appCommit=${{ github.sha }} -X main.appDate=${{ env.TIME }}
|
|
platforms: 'linux/amd64, linux/386, linux/arm, linux/arm64, linux/mipsle, darwin/amd64, windows/amd64, windows/386'
|
|
package: ./cmd
|
|
compress: false
|
|
|
|
- name: Upload
|
|
uses: meeDamian/github-release@2.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
gzip: false
|
|
allow_override: true
|
|
files: >
|
|
./dist/hysteria-linux-amd64
|
|
./dist/hysteria-linux-386
|
|
./dist/hysteria-linux-arm
|
|
./dist/hysteria-linux-arm64
|
|
./dist/hysteria-linux-mipsle
|
|
./dist/hysteria-darwin-amd64
|
|
./dist/hysteria-windows-amd64.exe
|
|
./dist/hysteria-windows-386.exe
|