Skip to content

Commit

Permalink
Updated release action to parse tag name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
MewX committed Nov 1, 2020
1 parent 67085eb commit 86d2287
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Get tag name
uses: olegtarasov/get-tag@v2
id: tagName

- name: Install protoc, protoc-gen-go
run: sudo apt install protobuf-compiler golang-goprotobuf-dev

Expand All @@ -36,8 +40,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ steps.tagName.outputs.tag }}
release_name: Release ${{ steps.tagName.outputs.tag }}
body: |
Automatic Release by GitHub Workflow
draft: false
Expand All @@ -51,5 +55,5 @@ jobs:
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: ./releases/doubak-linux-amd64
asset_name: doubak-${{ github.ref }}-linux-amd64
asset_name: doubak-${{ steps.tagName.outputs.tag }}-linux-amd64
asset_content_type: application/x-binary

0 comments on commit 86d2287

Please sign in to comment.