From 6299ad26d5cf89347ef6fb869442a78aa56af426 Mon Sep 17 00:00:00 2001 From: Robert Lippens Date: Thu, 30 Apr 2020 22:54:01 -0700 Subject: [PATCH] try a release from a tag --- .github/workflows/release.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40e875d..1388dd3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,8 @@ -on: push +on: + push: + tags: + - "v*" + name: Build jobs: release-linux-amd64: @@ -13,10 +17,30 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: compile and release + - name: compile and release linux amd64 env: GOARCH: amd64 GOOS: linux run: | go get -v ./... - go build + go build -o vault_raft_snapshot_agent_linux_amd64 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./vault_raft_snapshot_agent_linux_amd64 + asset_name: vault_raft_snapshot_agent_linux_amd64 + asset_content_type: application/octet-stream