115 lines
4.6 KiB
YAML
115 lines
4.6 KiB
YAML
name: build release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.13.0'
|
|
|
|
- name: Build
|
|
run: make -j $(nproc) compile VERSION=${{ github.ref }}
|
|
|
|
- name: create release
|
|
id: create_release
|
|
uses: actions/create-release@latest
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Release ${{ github.ref }}
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: darwin-386
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-darwin-386
|
|
asset_name: ${{ github.event.repository.name }}-darwin-386
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: darwin-amd64
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-darwin-amd64
|
|
asset_name: ${{ github.event.repository.name }}-darwin-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: freebsd-386
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-freebsd-386
|
|
asset_name: ${{ github.event.repository.name }}-freebsd-386
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: freebsd-amd64
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-freebsd-amd64
|
|
asset_name: ${{ github.event.repository.name }}-freebsd-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: linux-386
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-linux-386
|
|
asset_name: ${{ github.event.repository.name }}-linux-386
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: linux-amd64
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-linux-amd64
|
|
asset_name: ${{ github.event.repository.name }}-linux-amd64
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: windows-386
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-windows-386.exe
|
|
asset_name: ${{ github.event.repository.name }}-windows-386.exe
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: windows-amd64
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./bin/${{ github.event.repository.name }}-windows-amd64.exe
|
|
asset_name: ${{ github.event.repository.name }}-windows-amd64.exe
|
|
asset_content_type: application/octet-stream
|
|
|