EIM-79 discovery of existing idf installations #719
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unified Build Workflow | |
on: | |
push: | |
tags: | |
- "v*" | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- created | |
workflow_dispatch: | |
jobs: | |
setup: | |
name: Define Build Matrix | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Set up build matrix | |
id: set-matrix | |
run: | | |
echo "matrix={\"include\":[{\"os\":\"ubuntu-22.04\",\"package_name\":\"linux-x64\",\"target\":\"\",\"use_container\":true},{\"os\":\"ubuntu-22.04-arm\",\"package_name\":\"linux-aarch64\",\"target\":\"aarch64-unknown-linux-gnu\",\"use_container\":true},{\"os\":\"windows-latest\",\"package_name\":\"windows-x64\",\"target\":\"\",\"use_container\":false},{\"os\":\"macos-latest\",\"package_name\":\"macos-aarch64\",\"target\":\"aarch64-apple-darwin\",\"use_container\":false},{\"os\":\"macos-13\",\"package_name\":\"macos-x64\",\"target\":\"x86_64-apple-darwin\",\"use_container\":false}]}" >> $GITHUB_OUTPUT | |
build-test-lib: | |
name: Build and Test Library (${{ matrix.package_name }}) | |
needs: setup | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Install OpenSSL (Windows) | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: | | |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV | |
vcpkg install openssl:x64-windows-static-md | |
- name: Install dependencies (Linux) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libssl-dev patchelf | |
- name: Cache cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Build and Test Library | |
if: runner.os != 'Windows' | |
run: | | |
cd src-tauri | |
cargo test --no-fail-fast --no-default-features --lib ${{ matrix.target && format('--target {0}', matrix.target) || '' }} 2>&1 | tee lib-result.txt | |
shell: bash | |
continue-on-error: true | |
- name: Format test results | |
if: runner.os != 'Windows' | |
uses: hahihula/rust-test-results-formatter@v1 | |
with: | |
results-file: "./src-tauri/lib-result.txt" | |
build-cli-linux: | |
name: Build CLI (Linux - ${{ matrix.package_name }}) | |
needs: [setup, build-test-lib] | |
if: (needs.build-test-lib.result == 'success' || needs.build-test-lib.result == 'skipped') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
package_name: linux-x64 | |
target: "" | |
- os: ubuntu-24.04-arm | |
package_name: linux-aarch64 | |
target: aarch64-unknown-linux-musl | |
container: | |
image: clux/muslrust:stable | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y libssl-dev patchelf zip | |
- name: Build CLI | |
run: | | |
cd src-tauri | |
cargo build --release --no-default-features --features cli ${{ matrix.target && format('--target {0}', matrix.target) || '' }} | |
shell: bash | |
- name: Create release directory | |
run: mkdir -p release_cli/${{ matrix.package_name }} | |
- name: Copy binary | |
run: | | |
cp src-tauri/target/${{ matrix.target || 'x86_64-unknown-linux-musl' }}/release/eim release_cli/${{ matrix.package_name }}/eim | |
chmod +x release_cli/${{ matrix.package_name }}/eim | |
cd release_cli/${{ matrix.package_name }} | |
zip -r eim.zip eim | |
shell: bash | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-cli-${{ matrix.package_name }}-${{ github.run_number }} | |
path: release_cli/${{ matrix.package_name }}/eim | |
- name: Upload artifact for tag | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-cli-${{ matrix.package_name }}-${{ github.ref_name }} | |
path: release_cli/${{ matrix.package_name }}/eim | |
- name: Upload Release Asset - Unix | |
if: github.event_name == 'release' && github.event.action == 'created' && runner.os != 'Windows' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: release_cli/${{ matrix.package_name }}/eim.zip | |
asset_name: eim-cli-${{ matrix.package_name }}.zip | |
build-cli: | |
name: Build CLI (${{ matrix.package_name }}) | |
needs: [setup, build-test-lib] | |
if: (needs.build-test-lib.result == 'success' || needs.build-test-lib.result == 'skipped') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
package_name: windows-x64 | |
target: "" | |
- os: macos-latest | |
package_name: macos-aarch64 | |
target: aarch64-apple-darwin | |
- os: macos-13 | |
package_name: macos-x64 | |
target: x86_64-apple-darwin | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Set up Perl (Windows) | |
if: runner.os == 'Windows' | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: "5.38" | |
- name: Install Perl dependencies (Windows) | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: | | |
cpan App::cpanminus | |
cpanm --force Locale::Maketext::Simple | |
cpanm --force Text::Template | |
cpanm --force Params::Check | |
cpanm --force IPC::Cmd | |
perl -MLocale::Maketext::Simple -e "print 'Locale::Maketext::Simple loaded successfully\n'" | |
perl -MText::Template -e "print 'Text::Template loaded successfully\n'" | |
perl -MParams::Check -e "print 'Params::Check loaded successfully\n'" | |
perl -MIPC::Cmd -e "print 'IPC::Cmd loaded successfully\n'" | |
$perl_lib_path = "C:\hostedtoolcache\windows\perl\5.38.5-thr\x64\site\lib" | |
echo "PERL5LIB=$perl_lib_path" >> $env:GITHUB_ENV | |
- name: Cache cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Build CLI | |
if: runner.os == 'Windows' | |
env: | |
OPENSSL_DIR: 'C:\vcpkg\installed\x64-windows-static-md' | |
OPENSSL_LIB_DIR: 'C:\vcpkg\installed\x64-windows-static-md\lib' | |
OPENSSL_INCLUDE_DIR: 'C:\vcpkg\installed\x64-windows-static-md\include' | |
OPENSSL_STATIC: "1" | |
PERL: 'C:\\hostedtoolcache\\windows\\perl\\5.38.5-thr\\x64\\bin\\perl.exe' | |
run: | | |
cd src-tauri | |
cargo build --release --no-default-features --features cli ${{ matrix.target && format('--target {0}', matrix.target) || '' }} | |
shell: bash | |
- name: Build CLI | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
cd src-tauri | |
cargo build --release --no-default-features --features cli ${{ matrix.target && format('--target {0}', matrix.target) || '' }} | |
shell: bash | |
- name: Create release directory | |
run: mkdir -p release_cli/${{ matrix.package_name }} | |
- name: Copy binary (Windows) | |
if: runner.os == 'Windows' | |
run: copy src-tauri\target\release\eim.exe release_cli\${{ matrix.package_name }}\eim.exe | |
shell: cmd | |
- name: Copy binary (macOS) | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
cp src-tauri/target/${{ matrix.target }}/release/eim release_cli/${{ matrix.package_name }}/eim | |
chmod +x release_cli/${{ matrix.package_name }}/eim | |
cd release_cli/${{ matrix.package_name }} | |
zip -r eim.zip eim | |
shell: bash | |
- name: Sign Windows Binary | |
if: runner.os == 'Windows' | |
env: | |
WINDOWS_PFX_FILE: ${{ secrets.WIN_CERTIFICATE }} | |
WINDOWS_PFX_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PWD }} | |
run: | | |
echo $env:WINDOWS_PFX_FILE | Out-File -FilePath cert.b64 -Encoding ASCII | |
certutil -decode cert.b64 cert.pfx | |
Remove-Item cert.b64 | |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe" sign /f cert.pfx /p $env:WINDOWS_PFX_PASSWORD /tr http://timestamp.digicert.com /td sha256 /fd sha256 release_cli/${{ matrix.package_name }}/eim.exe | |
- name: Codesign macOS Binary | |
if: startsWith(matrix.os, 'macos') | |
env: | |
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | |
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
run: | | |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 | |
security create-keychain -p espressif build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p espressif build.keychain | |
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k espressif build.keychain | |
codesign --entitlements eim.entitlement --options runtime --force -s "ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. (QWXF6GB4AV)" release_cli/${{ matrix.package_name }}/eim -v | |
codesign -v -vvv --deep release_cli/${{ matrix.package_name }}/eim | |
- name: Notarize macOS Binary | |
if: startsWith(matrix.os, 'macos') && github.event_name == 'release' | |
env: | |
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }} | |
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} | |
NOTARIZATION_TEAM_ID: ${{ secrets.NOTARIZATION_TEAM_ID }} | |
run: | | |
cd release_cli/${{ matrix.package_name }} | |
zip -r eim.zip eim | |
security create-keychain -p espressif notary.keychain | |
security default-keychain -s notary.keychain | |
security unlock-keychain -p espressif notary.keychain | |
xcrun notarytool store-credentials "eim-notarytool-profile" --apple-id $NOTARIZATION_USERNAME --team-id $NOTARIZATION_TEAM_ID --password $NOTARIZATION_PASSWORD | |
xcrun notarytool submit eim.zip --keychain-profile "eim-notarytool-profile" --wait | |
unzip -o eim.zip -d . | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-cli-${{ matrix.package_name }}-${{ github.run_number }} | |
path: release_cli/${{ matrix.package_name }}/eim${{ runner.os == 'Windows' && '.exe' || '' }} | |
- name: Upload artifact for tag | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-cli-${{ matrix.package_name }}-${{ github.ref_name }} | |
path: release_cli/${{ matrix.package_name }}/eim${{ runner.os == 'Windows' && '.exe' || '' }} | |
- name: Upload Release Asset - MacOs | |
if: github.event_name == 'release' && github.event.action == 'created' && runner.os != 'Windows' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: release_cli/${{ matrix.package_name }}/eim.zip | |
asset_name: eim-cli-${{ matrix.package_name }}.zip | |
- name: Upload Release Asset (Windows) | |
if: github.event_name == 'release' && github.event.action == 'created' && runner.os == 'Windows' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: release_cli/${{ matrix.package_name }}/eim.exe | |
asset_name: eim-cli-${{ matrix.package_name }}.exe | |
build-gui: | |
name: Build GUI (${{ matrix.package_name }}) | |
needs: [setup, build-test-lib] | |
if: needs.build-test-lib.result == 'success' || needs.build-test-lib.result == 'skipped' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Install OpenSSL (Windows) | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: | | |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV | |
vcpkg install openssl:x64-windows-static-md | |
- name: Install dependencies (Linux) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libssl-dev patchelf | |
- name: Cache cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Install frontend dependencies | |
run: yarn install | |
- name: Import macOS codesign certs | |
if: startsWith(matrix.os, 'macos') | |
uses: apple-actions/import-codesign-certs@v3 | |
with: | |
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} | |
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
keychain: build | |
- name: Build GUI (macOS) - release | |
if: startsWith(matrix.os, 'macos') && github.event_name == 'release' | |
env: | |
APPLE_ID: ${{ secrets.NOTARIZATION_USERNAME }} | |
APPLE_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.NOTARIZATION_TEAM_ID }} | |
run: | | |
security create-keychain -p espressif notary.keychain | |
security default-keychain -s notary.keychain | |
security unlock-keychain -p espressif notary.keychain | |
yarn tauri build | |
- name: Build GUI (macOS) - non-release | |
if: startsWith(matrix.os, 'macos') && github.event_name != 'release' | |
run: yarn tauri build | |
- name: Build GUI (non-macOS) | |
if: ${{ !startsWith(matrix.os, 'macos') }} | |
run: yarn tauri build | |
- name: Sign Windows Binary | |
if: runner.os == 'Windows' | |
env: | |
WINDOWS_PFX_FILE: ${{ secrets.WIN_CERTIFICATE }} | |
WINDOWS_PFX_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PWD }} | |
run: | | |
echo $env:WINDOWS_PFX_FILE | Out-File -FilePath cert.b64 -Encoding ASCII | |
certutil -decode cert.b64 cert.pfx | |
Remove-Item cert.b64 | |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe" sign /f cert.pfx /p $env:WINDOWS_PFX_PASSWORD /tr http://timestamp.digicert.com /td sha256 /fd sha256 .\src-tauri\target\release\eim.exe | |
- name: Handle Linux artifacts | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
chmod +x src-tauri/target/release/eim | |
chmod +x src-tauri/target/release/bundle/appimage/*.AppImage | |
cd src-tauri/target/release/ | |
zip -r eim.zip eim | |
- name: Handle macOS artifacts | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
chmod +x src-tauri/target/release/bundle/macos/eim.app | |
cd src-tauri/target/release/bundle/macos | |
zip -r eim.zip eim.app | |
- name: Upload Linux artifacts | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }} | |
path: | | |
src-tauri/target/release/eim | |
# src-tauri/target/release/bundle/deb/*.deb | |
# src-tauri/target/release/bundle/rpm/*.rpm | |
# src-tauri/target/release/bundle/appimage/*.AppImage | |
if-no-files-found: warn | |
- name: Upload Linux artifacts - .deb | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }}-deb | |
path: | | |
src-tauri/target/release/bundle/deb/*.deb | |
# src-tauri/target/release/bundle/rpm/*.rpm | |
# src-tauri/target/release/bundle/appimage/*.AppImage | |
if-no-files-found: warn | |
- name: Upload Linux artifacts - .rpm | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }}-rpm | |
path: | | |
src-tauri/target/release/bundle/rpm/*.rpm | |
# src-tauri/target/release/bundle/appimage/*.AppImage | |
if-no-files-found: warn | |
- name: Upload Linux artifacts - .AppImage | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }}-AppImage | |
path: | | |
src-tauri/target/release/bundle/appimage/*.AppImage | |
if-no-files-found: warn | |
- name: Upload macOS artifacts | |
if: startsWith(matrix.os, 'macos') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }} | |
path: | | |
# src-tauri/target/release/bundle/macos/eim.app | |
# src-tauri/target/release/bundle/dmg/*.dmg | |
src-tauri/target/release/bundle/macos/*.app | |
if-no-files-found: warn | |
- name: Upload macOS artifacts - dmg | |
if: startsWith(matrix.os, 'macos') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }}-dmg | |
path: | | |
src-tauri/target/release/bundle/dmg/*.dmg | |
if-no-files-found: warn | |
- name: Upload Windows artifacts | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }} | |
path: | | |
src-tauri/target/release/eim.exe | |
# src-tauri/target/release/bundle/msi/*.msi | |
if-no-files-found: warn | |
- name: Upload Windows artifacts - msi | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eim-gui-${{ matrix.package_name }}-${{ github.run_number }}-msi | |
path: | | |
src-tauri/target/release/bundle/msi/*.msi | |
if-no-files-found: warn | |
- name: Upload Release Assets (Windows) | |
if: github.event_name == 'release' && github.event.action == 'created' && runner.os == 'Windows' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/eim.exe | |
asset_name: eim-gui-${{ matrix.package_name }}.exe | |
- name: Upload Release Assets (Windows msi) | |
if: github.event_name == 'release' && github.event.action == 'created' && runner.os == 'Windows' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/bundle/msi/*.msi | |
asset_name: eim-gui-${{ matrix.package_name }}.msi | |
- name: Upload Release Assets (Linux) | |
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'ubuntu') | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/eim.zip | |
asset_name: eim-gui-${{ matrix.package_name }}.zip | |
- name: Upload Release Assets (Linux - .deb) | |
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'ubuntu') | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/bundle/deb/*.deb | |
asset_name: eim-gui-${{ matrix.package_name }}.deb | |
- name: Upload Release Assets (Linux - .rpm) | |
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'ubuntu') | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/bundle/deb/*.rpm | |
asset_name: eim-gui-${{ matrix.package_name }}.rpm | |
- name: Upload Release Assets (Linux - .AppImage) | |
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'ubuntu') | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/bundle/deb/*.AppImage | |
asset_name: eim-gui-${{ matrix.package_name }}.AppImage | |
- name: Upload Release Assets (macOS) | |
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'macos') | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/bundle/macos/eim.zip | |
asset_name: eim-gui-${{ matrix.package_name }}.zip | |
- name: Upload Release Assets (macOS - dmg) | |
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(matrix.os, 'macos') | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: src-tauri/target/release/bundle/dmg/*.dmg | |
asset_name: eim-gui-${{ matrix.package_name }}.dmg | |
Autotest-CLI: | |
needs: [build-cli, build-cli-linux] | |
if: needs.build-cli.result == 'success' && needs.build-cli-linux.result == 'success' | |
uses: ./.github/workflows/test_cli.yml | |
with: | |
run_number: ${{ github.run_number }} | |
ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
Autotest-GUI: | |
needs: [build-gui] | |
if: needs.build-gui.result == 'success' | |
uses: ./.github/workflows/test_gui.yml | |
with: | |
run_number: ${{ github.run_number }} | |
ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
update-release-info: | |
name: Update Release Information | |
needs: [build-cli, build-cli-linux, build-gui] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' | |
steps: | |
- name: Fetch latest release info | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ap-east-1 | |
run: | | |
# GUI release info | |
curl -s https://api.github.com/repos/espressif/idf-im-ui/releases/latest > eim_unified_release.json | |
echo "Latest GUI release tag: $(jq -r .tag_name eim_unified_release.json)" | |
aws s3 cp --acl=public-read "eim_unified_release.json" s3://espdldata/dl/eim/eim_unified_release.json | |
aws cloudfront create-invalidation --distribution-id ${DL_DISTRIBUTION_ID} --paths "/dl/eim/eim_unified_release.json" |