From 3615aee9913fb39f1b68fae5113285074461befd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20K=C3=B6nig?= Date: Tue, 23 Apr 2024 21:51:22 +0200 Subject: [PATCH] update GH action again --- .github/workflows/release.yml | 99 +++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 792fd537..5e2c8368 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,8 @@ jobs: APPLE_TEAM_ID: "${{ secrets.APPLE_TEAM_ID }}" steps: + ### system setup + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -34,93 +36,102 @@ jobs: - run: yarn - run: rustup toolchain install stable - - run: rustup target add aarch64-apple-darwin - if: matrix.platform == 'macos-latest' - - run: rustup target add x86_64-apple-darwin + - name: mac > setup targets if: matrix.platform == 'macos-latest' + run: | + rustup target add aarch64-apple-darwin + rustup target add x86_64-apple-darwin - - name: (linux) install dependencies + - name: linux > install dependencies if: matrix.platform == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 librsvg2-dev patchelf - - name: build apple-silicon app - run: yarn tauri:build --target aarch64-apple-darwin - if: matrix.platform == 'macos-latest' + ### build apple arm - - name: (mac arm) upload .dmg + - name: mac aaarch64 > build + run: yarn tauri:build --target aarch64-apple-darwin if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v4 - with: - path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/elasticvue_*_aarch64.dmg - - name: (mac arm) rename artifacts + - name: mac aaarch64 > rename artifacts if: matrix.platform == 'macos-latest' run: | mv src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue.app.tar.gz src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64.app.tar.gz mv src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue.app.tar.gz.sig src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64.app.tar.gz.sig - - name: (mac arm) upload .app and artifacts + - name: mac aaarch64 > upload artifacts if: matrix.platform == 'macos-latest' uses: actions/upload-artifact@v4 with: - path: src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64* - - - run: yarn tauri:build - if: matrix.platform != 'macos-latest' + name: mac_aaarch64_artifacts + if-no-files-found: error + path: | + src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/elasticvue_*_aarch64.dmg + src-tauri/target/aarch64-apple-darwin/release/bundle/macos/elasticvue_aarch64* - - run: yarn tauri:build --target x86_64-apple-darwin - if: matrix.platform == 'macos-latest' + ### build apple x86_64 - - name: (mac) upload .dmg + - name: mac x86_64 > build + run: yarn tauri:build --target x86_64-apple-darwin if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v4 - with: - path: src-tauri/target/release/bundle/dmg/elasticvue_*_x64.dmg - - name: (mac) rename artifacts + - name: mac x86_64 > rename artifacts if: matrix.platform == 'macos-latest' run: | mv src-tauri/target/release/bundle/macos/elasticvue.app.tar.gz src-tauri/target/release/bundle/macos/elasticvue_x64.app.tar.gz mv src-tauri/target/release/bundle/macos/elasticvue.app.tar.gz.sig src-tauri/target/release/bundle/macos/elasticvue_x64.app.tar.gz.sig - - name: (mac) upload .app and artifacts + - name: mac x86_64 > upload artifacts if: matrix.platform == 'macos-latest' uses: actions/upload-artifact@v4 with: - path: src-tauri/target/release/bundle/macos/elasticvue_x64* + name: mac_x86_64_artifacts + if-no-files-found: error + path: | + src-tauri/target/release/bundle/dmg/elasticvue_*_x64.dmg + src-tauri/target/release/bundle/macos/elasticvue_x64* - - name: (linux) upload .deb - if: matrix.platform == 'ubuntu-latest' - uses: actions/upload-artifact@v4 - with: - path: src-tauri/target/release/bundle/deb/elasticvue_*_amd64.deb + ### build linux - - name: (linux) upload .appimage + - name: linux > build + run: yarn tauri:build if: matrix.platform == 'ubuntu-latest' - uses: actions/upload-artifact@v4 - with: - path: src-tauri/target/release/bundle/appimage/elasticvue_*_amd64.* - - name: (linux) upload binary - id: linux_upload_binary + - name: linux > upload artifacts if: matrix.platform == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: - path: src-tauri/target/release/elasticvue + name: linux_artifacts + if-no-files-found: error + path: | + src-tauri/target/release/bundle/deb/elasticvue_*_amd64.deb + src-tauri/target/release/bundle/appimage/elasticvue_*_amd64.* + src-tauri/target/release/elasticvue + + ### build windows - - name: (windows) upload .msi + - name: windows > build + run: yarn tauri:build if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v4 - with: - path: src-tauri/target/release/bundle/msi/elasticvue_*_x64* - - name: (windows) upload .exe + - name: windows > upload artifacts if: matrix.platform == 'windows-latest' uses: actions/upload-artifact@v4 with: - path: src-tauri/target/release/elasticvue.exe + name: windows_msi + if-no-files-found: error + path: | + src-tauri/target/release/bundle/msi/elasticvue_*_x64* + src-tauri/target/release/elasticvue.exe + + ### merge artifacts + + - name: Merge artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: artifacts + delete-merged: true build_docker: name: Build docker images