Skip to content

Commit

Permalink
try a release from a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretius committed May 1, 2020
1 parent 8ae01fe commit 6299ad2
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: push
on:
push:
tags:
- "v*"

name: Build
jobs:
release-linux-amd64:
Expand All @@ -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

0 comments on commit 6299ad2

Please sign in to comment.