hysteria-dev/.github/workflows/build-master.yml
2022-01-04 18:42:36 -08:00

44 lines
1.0 KiB
YAML

name: Build master
on:
push:
branches:
- 'master'
tags-ignore:
- 'v*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Check out
uses: actions/checkout@v2.4.0
- name: Get time
uses: gerred/actions/current-time@master
id: current-time
- name: Build
uses: crazy-max/ghaction-xgo@v1.6.1
env:
TIME: "${{ steps.current-time.outputs.time }}"
with:
xgo_version: latest
go_version: 1.17
dest: dist
prefix: hysteria
targets: linux/amd64,linux/386,linux/arm-5,linux/arm-7,linux/arm64,linux/mipsle,darwin-10.12/amd64,darwin-10.12/arm64,windows-6.0/amd64,windows-6.0/386
ldflags: -w -s -X main.appCommit=${{ github.sha }} -X main.appDate=${{ env.TIME }}
pkg: cmd
- name: Archive
uses: actions/upload-artifact@v2
with:
name: dist
path: dist