From fa9313c39b6d57468f7f830a8b66ac804b9b99ac Mon Sep 17 00:00:00 2001 From: Jeff Harris Date: Wed, 14 Apr 2021 06:35:20 +1200 Subject: [PATCH] workflow: tag release 4 --- .github/workflows/tag.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 11afb7c5..9a0e4287 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -6,6 +6,7 @@ on: jobs: build-linux: + needs: create-release runs-on: ubuntu-18.04 strategy: matrix: @@ -57,7 +58,16 @@ jobs: - name: Create artifact if: startsWith(github.ref, 'refs/tags/') run: | - tar -czvf ${{ github.workspace }}/dethrace-${{ steps.get_version.version}}-linux-amd64.tar.gz ./build/dethrace + tar -czvf ${{ github.workspace }}/dethrace-${{ steps.get_version.VERSION}}-linux-amd64.tar.gz ./build/dethrace + - name: upload linux artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/dethrace-${{ steps.get_version.VERSION}}-linux-amd64.tar.gz + asset_name: dethrace-${{ steps.get_version.VERSION}}-linux-amd64.tar.gz + asset_content_type: application/octet-stream create-release: if: startsWith(github.ref, 'refs/tags/') @@ -78,19 +88,4 @@ jobs: tag_name: ${{ github.ref }} body: "hello world" env: - GITHUB_TOKEN: ${{ github.token }} - - upload-artifacts: - if: startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - needs: [create-release, build-linux] - steps: - - name: upload linux artifact - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/dethrace-${{ steps.get_version.version}}-linux-amd64.tar.gz - asset_name: dethrace-${{ steps.get_version.version}}-linux-amd64.tar.gz - asset_content_type: application/octet-stream \ No newline at end of file + GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file