diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3c48afd..82aeea8 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -45,3 +45,21 @@ jobs: - name: Build binaries run: make build + + - name: Create tarball + run: tar -czvf bin.tar.gz bin + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: binary + path: bin.tar.gz + + - name: Upload release asset + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: bin.tar.gz + asset_name: bin-${{ github.ref_name }}.tar.gz + asset_content_type: application/gzip \ No newline at end of file