Build & Bundle #39
Workflow file for this run
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: "Build & Bundle" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: linux-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: linux-cargo- | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libgtk-3-dev libpng-dev libjpeg-dev libgl1-mesa-dev libglu1-mesa-dev libxkbcommon-dev libexpat1-dev libtiff-dev | |
| - name: Build Dependencies | |
| run: | | |
| cargo install patch-crate | |
| cargo fetch --locked || true | |
| cargo patch-crate --force | |
| cargo install cargo-bundle | |
| mkdir -p build/out | |
| - name: Build & Bundle (Linux) | |
| run: | | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --release --format appimage | |
| cp -R target/release/bundle/appimage/*.AppImage build/out/ | |
| - name: Upload Bundles | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plumeimpactor-linux | |
| path: build/out/* | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: macos-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: macos-cargo- | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin | |
| - name: Setup macOS Certificates | |
| uses: apple-actions/import-codesign-certs@v5 | |
| with: | |
| p12-file-base64: ${{ secrets.DEV_ID_P12_BASE64 }} | |
| p12-password: ${{ secrets.DEV_ID_P12_PASSWORD }} | |
| - name: Build Dependencies | |
| run: | | |
| cargo install patch-crate | |
| cargo fetch --locked || true | |
| cargo patch-crate --force | |
| cargo install cargo-bundle | |
| mkdir -p build/out | |
| mkdir -p build/dmg | |
| - name: Build & Bundle (macOS) | |
| run: | | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --release --format osx | |
| cp -R target/release/bundle/osx/plumeimpactor.app build/dmg/plumeimpactor.app | |
| codesign --deep --force --options runtime --sign "${{ secrets.DEV_ID_IDENTITY_NAME }}" build/dmg/plumeimpactor.app | |
| ln -s /Applications build/dmg/Applications | |
| hdiutil create -volname plumeimpactor -srcfolder build/dmg -ov -format UDZO build/out/PlumeImpactor.dmg | |
| xcrun notarytool submit build/out/PlumeImpactor.dmg --apple-id "${{ secrets.APPLE_ID_EMAIL }}" --password "${{ secrets.APPLE_ID_PASSWORD }}" --team-id "${{ secrets.APPLE_ID_TEAM }}" --wait | |
| xcrun stapler staple build/out/PlumeImpactor.dmg | |
| - name: Upload Bundles | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plumeimpactor-macos | |
| path: build/out/* | |
| build-macos-intel: | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: macos-intel-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: macos-intel-cargo- | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup macOS Certificates | |
| uses: apple-actions/import-codesign-certs@v5 | |
| with: | |
| p12-file-base64: ${{ secrets.DEV_ID_P12_BASE64 }} | |
| p12-password: ${{ secrets.DEV_ID_P12_PASSWORD }} | |
| - name: Build Dependencies | |
| run: | | |
| cargo install patch-crate | |
| cargo fetch --locked || true | |
| cargo patch-crate --force | |
| cargo install cargo-bundle | |
| mkdir -p build/out | |
| mkdir -p build/dmg | |
| - name: Build & Bundle (macOS Intel) | |
| run: | | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --release --format osx | |
| cp -R target/release/bundle/osx/plumeimpactor.app build/dmg/plumeimpactor.app | |
| codesign --deep --force --options runtime --sign "${{ secrets.DEV_ID_IDENTITY_NAME }}" build/dmg/plumeimpactor.app | |
| ln -s /Applications build/dmg/Applications | |
| hdiutil create -volname plumeimpactor -srcfolder build/dmg -ov -format UDZO build/out/PlumeImpactor.dmg | |
| xcrun notarytool submit build/out/PlumeImpactor.dmg --apple-id "${{ secrets.APPLE_ID_EMAIL }}" --password "${{ secrets.APPLE_ID_PASSWORD }}" --team-id "${{ secrets.APPLE_ID_TEAM }}" --wait | |
| xcrun stapler staple build/out/PlumeImpactor.dmg | |
| - name: Upload Bundles | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plumeimpactor-macos-intel | |
| path: build/out/* | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: windows-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: windows-cargo- | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup Windows dependencies | |
| run: choco install strawberryperl make --no-progress | |
| - name: Setup Windows MSVC environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build Dependencies | |
| run: | | |
| cargo install patch-crate | |
| cargo fetch --locked || true | |
| cargo patch-crate --force | |
| cargo install cargo-bundle | |
| mkdir -p build/out | |
| - name: Build & Bundle (Windows) | |
| run: | | |
| cargo build --bin plumeimpactor --release | |
| cp target/release/plumeimpactor.exe build/out | |
| - name: Upload Bundles | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plumeimpactor-windows | |
| path: build/out/* |