Skip to content

Commit

Permalink
use tar instead of zip
Browse files Browse the repository at this point in the history
  • Loading branch information
selimseker committed Sep 6, 2024
1 parent f997b35 commit f7b1fcf
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
include:
- { runner: macos-latest, goos: darwin, osname: macOS, arch: amd64, tags: netcgo }
# - { runner: macos-latest, goos: darwin, osname: macOS, arch: amd64, tags: netcgo }
- { runner: macos-latest, goos: darwin, osname: macOS, arch: arm64, tags: netcgo }
- { runner: ubuntu-latest, goos: linux, osname: linux, arch: amd64, env: CGO_ENABLED=0 }
- { runner: ubuntu-latest, goos: linux, osname: linux, arch: arm64, env: CGO_ENABLED=0 }
- { runner: ubuntu-latest, goos: windows, osname: windows, arch: amd64, env: CGO_ENABLED=0, extension: ".exe" }
- { runner: ubuntu-latest, goos: windows, osname: windows, arch: arm64, env: CGO_ENABLED=0, extension: ".exe" }
# - { runner: ubuntu-latest, goos: linux, osname: linux, arch: amd64, env: CGO_ENABLED=0 }
# - { runner: ubuntu-latest, goos: linux, osname: linux, arch: arm64, env: CGO_ENABLED=0 }
# - { runner: ubuntu-latest, goos: windows, osname: windows, arch: amd64, env: CGO_ENABLED=0, extension: ".exe" }
# - { runner: ubuntu-latest, goos: windows, osname: windows, arch: arm64, env: CGO_ENABLED=0, extension: ".exe" }

steps:
- name: Checkout code
Expand Down Expand Up @@ -53,9 +53,8 @@ jobs:
cd node_exe
echo "Downloading dkn-compute-node-${{ matrix.osname }}-${{ matrix.arch }}.zip..."
# todo: fix the latest tag url
if curl -L https://github.com/firstbatchxyz/dkn-compute-node/releases/download/v0.2.0/dkn-compute-node-${{ matrix.osname }}-${{ matrix.arch }}.zip; then
if curl -L -o dkn-compute-node-exe.tar.gz https://github.com/firstbatchxyz/dkn-compute-node/releases/latest/download/dkn-compute-node-${{ matrix.osname }}-${{ matrix.arch }}.tar.gz; then
echo "Download completed."
file *
ls
else
echo "Error: Failed to download the zip file."
Expand All @@ -77,19 +76,9 @@ jobs:
# copy exe to zip folder
cd node_exe
if [ ! -f dkn-compute-node-exe.zip ]; then
echo "Error: ZIP file not found!"
exit 1
fi
# Test the ZIP file for corruption
unzip -t *
if [ $? -ne 0 ]; then
echo "Error: Corrupted ZIP file!"
exit 1
fi
unzip dkn-compute-node-exe.zip
# unzip dkn-compute-node-exe.zip
tar -xzf dkn-compute-node-exe.tar.gz
cp dkn-compute${{ matrix.extension }} ../$FOLDER_NAME/dkn-compute${{ matrix.extension }}
cd ..
Expand Down

0 comments on commit f7b1fcf

Please sign in to comment.