Skip to content

Commit

Permalink
fix(ci): update GHA release process (#4945)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
leet4tari committed Nov 23, 2022
1 parent 0bdb568 commit 2af6c94
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/base_node_binaries.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
15 changes: 14 additions & 1 deletion .github/workflows/build_libwallets.yml
Expand Up @@ -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
Expand All @@ -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
22 changes: 12 additions & 10 deletions .github/workflows/build_libwallets_workflow.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Expand Up @@ -28,18 +28,15 @@ 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'

[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" }

0 comments on commit 2af6c94

Please sign in to comment.