Skip to content

Commit

Permalink
chore: use env.OS_ARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
0xArdi committed Aug 9, 2024
1 parent 5c34214 commit 19390f5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,21 @@ jobs:
run: poetry install

- name: Set arch environment variable for macos-latest-large
if: matrix.os == 'macos-14-large'
run: echo "ARCH=x64" >> $GITHUB_ENV
if: contains(matrix.os, 'large')
run: echo "OS_ARCH=x64" >> $GITHUB_ENV

- name: Set arch environment variable for other macOS versions
if: matrix.os != 'macos-14-large'
run: echo "ARCH=arm64" >> $GITHUB_ENV
if: ${{ !contains(matrix.os, 'large') }}
run: echo "OS_ARCH=arm64" >> $GITHUB_ENV

- name: Build with PyInstaller
run: |
poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_bin_${ARCH}
poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_bin_${{env.OS_ARCH}}
- name: Upload Release Assets
uses: actions/upload-artifact@v2
with:
name: "trader_bin_$ARCH"
path: "dist/trader_bin_$ARCH"
name: trader_bin_${{env.OS_ARCH}}
path: dist/trader_bin_${{env.OS_ARCH}}

upload-assets:
needs: build-macos-pyinstaller
Expand All @@ -204,16 +204,16 @@ jobs:
with:
name: trader_bin_x64
path: ./dist/
# - name: Download artifacts
# uses: actions/download-artifact@v2
# with:
# name: trader_bin_arm64
# path: ./dist/
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: trader_bin_arm64
path: ./dist/

- name: Publish Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./dist/trader_bin_x64
# ./dist/trader_bin_arm64
./dist/trader_bin_arm64

0 comments on commit 19390f5

Please sign in to comment.