on: 
  release:
    types: [published,edited]
name: Build Release
jobs:
  release-linux-amd64:
    name: release linux/amd64
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Install Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.14.x
    - name: compile and release
      run: |
        ./ci-build.sh
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GOARCH: amd64
        GOOS: linux

  release-linux-386:
    name: release linux/386
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Install Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.14.x
    - name: compile and release
      run: |
        ./ci-build.sh
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GOARCH: "386"
        GOOS: linux

  release-darwin-amd64:
    name: release darwin/amd64
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Install Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.14.x
    - name: compile and release
      run: |
        ./ci-build.sh
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GOARCH: amd64
        GOOS: darwin