From 2af6c94417a7cdaab35b91d03f6fba5dbb45961f Mon Sep 17 00:00:00 2001 From: "C.Lee Taylor" <47312074+leet4tari@users.noreply.github.com> Date: Wed, 23 Nov 2022 09:54:30 +0200 Subject: [PATCH] fix(ci): update GHA release process (#4945) Description Update GitHub release process - prep for draft -> release Combined release for tari_suite and libwallet Better libwallet filenames Motivation and Context Help users track our release via GitHub notifications. How Has This Been Tested? Tested in local fork --- .github/workflows/base_node_binaries.yml | 13 +++++++++-- .github/workflows/build_libwallets.yml | 15 ++++++++++++- .../workflows/build_libwallets_workflow.yml | 22 ++++++++++--------- Cargo.toml | 3 --- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/.github/workflows/base_node_binaries.yml b/.github/workflows/base_node_binaries.yml index 0776143ccc..33bf334514 100644 --- a/.github/workflows/base_node_binaries.yml +++ b/.github/workflows/base_node_binaries.yml @@ -16,11 +16,16 @@ name: Build Matrix of Binaries required: true default: "development-tag" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: TBN_FILENAME: "tari_suite" TBN_BUNDLEID_BASE: "com.tarilabs.pkg" toolchain: nightly-2022-05-01 matrix-json-file: ".github/workflows/base_node_binaries.json" + CARGO_HTTP_MULTIPLEXING: false jobs: matrix-prep: @@ -85,9 +90,8 @@ jobs: id: vars shell: bash run: | - echo "VBRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + echo "VBRANCH=$(echo ${{ env.GITHUB_REF_NAME }})" >> $GITHUB_ENV echo "VSHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - echo "CARGO_HTTP_MULTIPLEXING=false" >> $GITHUB_ENV - name: Default Destination Folder run: | @@ -426,10 +430,15 @@ jobs: steps: - name: Download binaries uses: actions/download-artifact@v3 + - name: Create release uses: ncipollo/release-action@v1 with: artifacts: "tari_*/**/*" token: ${{ secrets.GITHUB_TOKEN }} + #bodyFile: changelog.md prerelease: true draft: true + allowUpdates: true + updateOnlyUnreleased: true + replacesArtifacts: true diff --git a/.github/workflows/build_libwallets.yml b/.github/workflows/build_libwallets.yml index 1279e146ef..a4df60ac8c 100644 --- a/.github/workflows/build_libwallets.yml +++ b/.github/workflows/build_libwallets.yml @@ -65,7 +65,7 @@ jobs: working-directory: libwallets run: | ls -alhtR - find . -name "*.sha256sums" -print | xargs cat >> libwallets.txt.sha256sums-verify + find . -name "*.sha256sums" -type f -print | xargs cat >> libwallets.txt.sha256sums-verify cat libwallets.txt.sha256sums-verify sha256sum -c libwallets.txt.sha256sums-verify @@ -90,10 +90,23 @@ jobs: steps: - name: Download binaries uses: actions/download-artifact@v3 + with: + path: libwallets + +# - name: Setup changelog +# shell: bash +# working-directory: libwallets +# run: | +# find . -name changelog.md -type f -exec cp -vf {} "$GITHUB_WORKSPACE/" \; + - name: Create release uses: ncipollo/release-action@v1 with: artifacts: "libwallet*/**/*" token: ${{ secrets.GITHUB_TOKEN }} + #bodyFile: "changelog.md" prerelease: true draft: true + allowUpdates: true + updateOnlyUnreleased: true + replacesArtifacts: true diff --git a/.github/workflows/build_libwallets_workflow.yml b/.github/workflows/build_libwallets_workflow.yml index 2d62c3f6a7..58834c2f5f 100644 --- a/.github/workflows/build_libwallets_workflow.yml +++ b/.github/workflows/build_libwallets_workflow.yml @@ -68,13 +68,14 @@ jobs: echo "target_platform=${target_platform}" >> $GITHUB_ENV mkdir -p "${{ runner.temp }}/libwallet-android-${target_platform}" cd "${{ runner.temp }}/libwallet-android-${target_platform}" - cp -v "$GITHUB_WORKSPACE/target/${{ matrix.build }}/release/libtari_wallet_ffi.a" "libtari_wallet_ffi.${target_platform}.a" - cp -v "$GITHUB_WORKSPACE/base_layer/wallet_ffi/wallet.h" . + cp -v "$GITHUB_WORKSPACE/target/${{ matrix.build }}/release/libtari_wallet_ffi.a" "libtari_wallet_ffi.android_${target_platform}.a" + cp -v "$GITHUB_WORKSPACE/base_layer/wallet_ffi/wallet.h" libtari_wallet_ffi.h + cp -v "$GITHUB_WORKSPACE/changelog.md" . cd .. shasum -a 256 \ - "libwallet-android-${target_platform}/libtari_wallet_ffi.${target_platform}.a" \ - "libwallet-android-${target_platform}/wallet.h" \ - > "libwallet-android-${target_platform}/libtari_wallet_ffi.${target_platform}.sha256sums" + "libwallet-android-${target_platform}/libtari_wallet_ffi.android_${target_platform}.a" \ + "libwallet-android-${target_platform}/libtari_wallet_ffi.h" \ + > "libwallet-android-${target_platform}/libtari_wallet_ffi.android_${target_platform}.sha256sums" ls -alht "${{ runner.temp }}/libwallet-android-${target_platform}" - name: Upload artifacts @@ -125,13 +126,14 @@ jobs: ./mobile_build.sh || exit 1 mkdir -p "${{ runner.temp }}/libwallet-ios" cd "${{ runner.temp }}/libwallet-ios" - cp -v "$GITHUB_WORKSPACE/MobileWallet/TariLib/libtari_wallet_ffi.a" . - cp -v "$GITHUB_WORKSPACE/base_layer/wallet_ffi/wallet.h" . + cp -v "$GITHUB_WORKSPACE/MobileWallet/TariLib/libtari_wallet_ffi.a" libtari_wallet_ffi.ios.a + cp -v "$GITHUB_WORKSPACE/base_layer/wallet_ffi/wallet.h" libtari_wallet_ffi.h + cp -v "$GITHUB_WORKSPACE/changelog.md" . cd .. shasum -a 256 \ - "libwallet-ios/libtari_wallet_ffi.a" \ - "libwallet-ios/wallet.h" \ - > "libwallet-ios/libtari_wallet_ffi.sha256sums" + "libwallet-ios/libtari_wallet_ffi.ios.a" \ + "libwallet-ios/libtari_wallet_ffi.h" \ + > "libwallet-ios/libtari_wallet_ffi.ios.sha256sums" ls -alht "${{ runner.temp }}/libwallet-ios" - name: Debugging - Upload logs if build failures diff --git a/Cargo.toml b/Cargo.toml index 19da9e5936..9badd81c6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,13 +28,11 @@ members = [ "applications/tari_app_utilities", "applications/tari_merge_mining_proxy", "applications/tari_miner", - ] # Add here until we move to edition=2021 resolver = "2" - # Shutdown when panicking so we can see the error, specifically for the wallet [profile.release] panic = 'abort' @@ -42,4 +40,3 @@ panic = 'abort' [patch.crates-io] # Temporarily lock pgp to commit (master branch at time of writing) because the currently release crate locks zeroize to =1.3 liblmdb-sys = { git = "https://github.com/tari-project/lmdb-rs", tag = "0.7.6-tari.1" } -