authorizer/.github/workflows/release.yaml
2021-09-11 11:57:52 +05:30

35 lines
1.1 KiB
YAML

on:
release:
types: [created]
jobs:
releases-windows:
name: Release Authorizer Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [windows]
goarch: [amd64]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install build-essential
- name: Install windows dependencies
if: ${{ matrix.goos == 'windows'}}
run: sudo apt-get install gcc-mingw-w64
- name: Set VERSION env
run: echo VERSION=$(basename ${GITHUB_REF}) >> ${GITHUB_ENV}
- name: Set GO_ENABLED env
run: echo CGO_ENABLED=1 >> ${GITHUB_ENV}
- name: Set Windows C Compiler GO env
if: ${{ matrix.goos == 'windows'}}
run: echo CC=/usr/bin/x86_64-w64-mingw32-gcc >> ${GITHUB_ENV}
- uses: wangyoucao577/go-release-action@v1.20
with:
github_token: ${{ secrets.RELEASE_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
build_command: make clean && make
md5sum: FALSE
extra_files: .env.sample app build template