forked from dashpay/electrum-dash-old
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6031928
commit 4c418e4
Showing
10 changed files
with
94 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
name: Build release workflow | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
# pull_request: | ||
# types: [ opened, synchronize, reopened ] | ||
# push: | ||
# branches: | ||
# - master | ||
tag: | ||
description: 'Tag name' | ||
required: true | ||
type: string | ||
target_os: | ||
description: 'Target OS for build' | ||
required: true | ||
type: choice | ||
options: | ||
- all | ||
- windows_linux | ||
- osx | ||
- android | ||
jobs: | ||
|
||
create_release: | ||
|
@@ -17,26 +33,27 @@ jobs: | |
steps: | ||
- name: Try to Get Release | ||
id: get_release | ||
uses: zebra-lucky/[email protected].3 | ||
uses: Bertrand256/[email protected].4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: ${{ github.ref }} | ||
tag: ${{ inputs.tag }} | ||
- name: Create Release | ||
id: create_release | ||
if: ${{ !steps.get_release.outputs.upload_url }} | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
tag_name: ${{ inputs.tag }} | ||
release_name: ${{ inputs.tag }} | ||
draft: false | ||
prerelease: false | ||
|
||
build_osx: | ||
needs: create_release | ||
runs-on: macos-10.15 | ||
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'osx' }} | ||
name: create release for macOS | ||
steps: | ||
- name: Checkout | ||
|
@@ -45,7 +62,7 @@ jobs: | |
id: set_vars | ||
run: | | ||
source ./contrib/dash/travis/electrum_dash_version_env.sh | ||
echo "::set-output name=pkg_ver::$(echo $DASH_ELECTRUM_VERSION)" | ||
echo "pkg_ver=$(echo $DASH_ELECTRUM_VERSION)" >> $GITHUB_OUTPUT | ||
- name: Prepare build | ||
env: | ||
DASH_ELECTRUM_VERSION: ${{ steps.set_vars.outputs.pkg_ver }} | ||
|
@@ -57,23 +74,24 @@ jobs: | |
run: | | ||
./contrib/dash/actions/script-osx.sh | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
uses: Bertrand256/upload-release-asset@v1.0.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg | ||
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg | ||
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg | ||
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-macosx.dmg | ||
asset_content_type: application/apple-diskimage | ||
|
||
build_apk: | ||
needs: create_release | ||
runs-on: ubuntu-18.04 | ||
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'android' }} | ||
strategy: | ||
matrix: | ||
arch: ['armeabi-v7a', 'arm64-v8a'] | ||
is_mainnet: [['true', 'Electrum_DASH'], | ||
['false', 'Electrum_DASH_Testnet']] | ||
is_mainnet: [['true', 'Electrum_FIRO'], | ||
['false', 'Electrum_FIRO_Testnet']] | ||
env: | ||
APP_ANDROID_ARCH: ${{ matrix.arch }} | ||
ELECTRUM_MAINNET: ${{ matrix.is_mainnet[0] }} | ||
|
@@ -89,10 +107,10 @@ jobs: | |
id: set_vars | ||
run: | | ||
source ./contrib/dash/travis/electrum_dash_version_env.sh | ||
echo "::set-output name=pkg_ver::$(echo $DASH_ELECTRUM_VERSION)" | ||
echo "::set-output name=apk_ver::$(echo $DASH_ELECTRUM_APK_VERSION)" | ||
echo "::set-output name=vercode::$(echo $DASH_ELECTRUM_VERSION_CODE)" | ||
echo "::set-output name=is_release::$(echo $IS_RELEASE)" | ||
echo "pkg_ver=$(echo $DASH_ELECTRUM_VERSION)" >> $GITHUB_OUTPUT | ||
echo "apk_ver=$(echo $DASH_ELECTRUM_APK_VERSION)" >> $GITHUB_OUTPUT | ||
echo "vercode=$(echo $DASH_ELECTRUM_VERSION_CODE)" >> $GITHUB_OUTPUT | ||
echo "is_release=$(echo $IS_RELEASE)" >> $GITHUB_OUTPUT | ||
- name: Prepare build | ||
if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }} | ||
env: | ||
|
@@ -113,7 +131,7 @@ jobs: | |
./contrib/dash/actions/script-linux-apk.sh | ||
- name: Upload Release Asset | ||
if: ${{ steps.set_vars.outputs.is_release || matrix.is_mainnet[0] == 'false' }} | ||
uses: actions/upload-release-asset@v1 | ||
uses: Bertrand256/upload-release-asset@v1.0.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
|
@@ -125,6 +143,7 @@ jobs: | |
build_linux_win: | ||
needs: create_release | ||
runs-on: ubuntu-18.04 | ||
if: ${{ inputs.target_os == 'all' || inputs.target_os == 'windows_linux' }} | ||
name: create release for Linux/Win | ||
steps: | ||
- name: Checkout | ||
|
@@ -150,52 +169,52 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz | ||
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz | ||
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz | ||
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.tar.gz | ||
asset_content_type: application/gzip | ||
- name: Upload sdist zip Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip | ||
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip | ||
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip | ||
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}.zip | ||
asset_content_type: application/x-zip-compressed | ||
- name: Upload AppImage Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage | ||
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage | ||
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage | ||
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-x86_64.AppImage | ||
asset_content_type: application/octet-stream | ||
- name: Upload Win32 Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe | ||
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe | ||
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe | ||
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win32.exe | ||
asset_content_type: application/vnd.microsoft.portable-executable | ||
- name: Upload Win64 Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: dist/Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe | ||
asset_name: Dash-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe | ||
asset_path: dist/Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe | ||
asset_name: Firo-Electrum-${{ steps.set_vars.outputs.pkg_ver }}-setup-win64.exe | ||
asset_content_type: application/vnd.microsoft.portable-executable | ||
|
||
upload_notify_artifact: | ||
runs-on: ubuntu-18.04 | ||
if: always() | ||
name: Upload Notify Artifact | ||
steps: | ||
- name: Upload Notify Artifact | ||
uses: zebra-lucky/[email protected] | ||
with: | ||
gh_ctx: ${{ toJson(github) }} | ||
# upload_notify_artifact: | ||
# runs-on: ubuntu-18.04 | ||
# if: always() | ||
# name: Upload Notify Artifact | ||
# steps: | ||
# - name: Upload Notify Artifact | ||
# uses: zebra-lucky/[email protected] | ||
# with: | ||
# gh_ctx: ${{ toJson(github) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.