From 86d2287a9ef7f69093c6a1af4dc8771130de7389 Mon Sep 17 00:00:00 2001 From: MewX Date: Sun, 1 Nov 2020 18:33:55 +1100 Subject: [PATCH] Updated release action to parse tag name correctly --- .github/workflows/release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2297aa..8aa4d97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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