diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 1ec2b2e..3482b65 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -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 @@ -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." @@ -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 ..