workflow: tag release 4

This commit is contained in:
Jeff Harris 2021-04-14 06:35:20 +12:00
parent 0c9e0124f8
commit fa9313c39b
1 changed files with 12 additions and 17 deletions

View File

@ -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
GITHUB_TOKEN: ${{ github.token }}