diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..4485d11 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,40 @@ +name: release tag + +on: + push: + tags: + - 'v*' + +jobs: + build: + name: Publish for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + artifact_name: flowctl + asset_name: flowctl.linux-amd64 + steps: + - name: set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + id: go + - name: checkout + uses: actions/checkout@v2 + - name: download modules + if: steps.cache.outputs.cache-hit != 'true' + run: go mod download + - name: test + run: go test ./... -v + - name: build + run: go build -o ${{ matrix.artifact_name }} cmd/flowctl/main.go + - name: upload + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ matrix.artifact_name }} + asset_name: ${{ matrix.asset_name }} + tag: ${{ github.ref }} + #overwrite: true