Skip to content

Commit

Permalink
Update release-builds.yaml
Browse files Browse the repository at this point in the history
New release approach
  • Loading branch information
monstrobishi authored Jan 13, 2021
1 parent 6a55d99 commit 4d66033
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/release-builds.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- "v*"
release:
types: [created]

jobs:

linux:
Expand Down Expand Up @@ -107,16 +107,11 @@ jobs:
zip -r "defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip" \
defichain-${{ env.BUILD_VERSION }}/
- name: Create release
id: create_release
uses: actions/create-release@v1
- name: Gets latest created release info
id: latest_release_info
uses: jossef/action-latest-release-info@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

- name: Generate SHA256 checksum
run: |
Expand All @@ -132,7 +127,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu/defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz
asset_content_type: application/gzip
Expand All @@ -142,7 +137,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu/defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz.SHA256
asset_content_type: text/plain
Expand All @@ -152,7 +147,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip
asset_content_type: application/zip
Expand All @@ -162,7 +157,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
asset_content_type: text/plain
Expand All @@ -172,7 +167,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz
asset_content_type: application/gzip
Expand All @@ -182,7 +177,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz.SHA256
asset_content_type: text/plain

0 comments on commit 4d66033

Please sign in to comment.