name: publish

on:
  push:
    tags:
      - '*'

jobs:
  publish:
    strategy:
      matrix:
        go-version: [ 1.15.x ]
        os: [ ubuntu-latest ]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@master
        with:
          fetch-depth: 1
      - name: Install Go
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.go-version }}
      - name: Make publish
        run: make publish
      - name: Upload release binaries
        uses: alexellis/upload-assets@0.2.2
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          asset_paths: '["./bin/faasd*"]'