Skip to content

Commit

Permalink
Zip files before uploading to releases.drivechain.info
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-L2L committed Mar 15, 2024
1 parent 9ebbaa6 commit 4bc2abf
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
TESTCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure)
echo "TESTCHAIN_VERSION=$TESTCHAIN_VERSION" >> "$GITHUB_ENV"
- name: move qt binary before uploading artifacts
run: mv src/qt/testchain-qt src/testchain-qt

- uses: actions/upload-artifact@v4
with:
name: testchain-${{ env.TESTCHAIN_VERSION }}-x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -98,14 +101,17 @@ jobs:
TESTCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure)
echo "TESTCHAIN_VERSION=$TESTCHAIN_VERSION" >> "$GITHUB_ENV"
- name: move qt binary before uploading artifacts
run: mv src/qt/testchain-qt src/testchain-qt

- uses: actions/upload-artifact@v4
with:
name: testchain-${{ env.TESTCHAIN_VERSION }}-x86_64-w64-mingw32
if-no-files-found: error
path: |
src/testchaind.exe
src/testchain-cli.exe
src/qt/testchain-qt.exe
src/testchain-qt.exe
build-macos:
name: Build macOS binaries
Expand Down Expand Up @@ -142,23 +148,36 @@ jobs:
TESTCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure)
echo "TESTCHAIN_VERSION=$TESTCHAIN_VERSION" >> "$GITHUB_ENV"
- name: move qt binary before uploading artifacts
run: mv src/qt/testchain-qt src/testchain-qt

- uses: actions/upload-artifact@v4
with:
name: testchain-${{ env.TESTCHAIN_VERSION }}-x86_64-apple-darwin11
if-no-files-found: error
path: |
src/testchaind
src/testchain-cli
src/qt/testchain-qt
src/testchain-qt
upload-artifacts-to-releases-drivechain-info:
name: Upload artifacts to releases.drivechain.info
runs-on: ubuntu-latest
needs: [build-linux, build-macos, build-windows]
if: github.repository_owner == 'LayerTwo-Labs'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Zip artifacts
run: |
mv testchain-*-x86_64-apple-darwin11 L2-Testchain-latest-x86_64-apple-darwin
zip -r L2-Testchain-latest-x86_64-apple-darwin.zip L2-Testchain-latest-x86_64-apple-darwin
mv testchain-*-x86_64-w64-mingw32 L2-Testchain-latest-x86_64-w64-mingw32
zip -r L2-Testchain-latest-x86_64-w64-mingw32.zip L2-Testchain-latest-x86_64-w64-mingw32
mv testchain-*-x86_64-unknown-linux-gnu L2-Testchain-latest-x86_64-unknown-linux-gnu
zip -r L2-Testchain-latest-x86_64-unknown-linux-gnu.zip L2-Testchain-latest-x86_64-unknown-linux-gnu
- name: Upload artifacts to releases.drivechain.info
uses: cross-the-world/ssh-scp-ssh-pipelines@latest
with:
Expand All @@ -167,6 +186,4 @@ jobs:
pass: ${{ secrets.RELEASES_SERVER_PW }}
port: 22
scp: |
'testchain-*-x86_64-apple-darwin11' => '/var/www/html/L2-Testchain-latest-x86_64-apple-darwin'
'testchain-*-x86_64-w64-mingw32' => '/var/www/html/L2-Testchain-latest-x86_64-w64-mingw32'
'testchain-*-x86_64-unknown-linux-gnu' => '/var/www/html/L2-Testchain-latest-x86_64-unknown-linux-gnu'
'L2-Testchain-latest-*.zip' => '/var/www/html/'

0 comments on commit 4bc2abf

Please sign in to comment.