fix: load bundled Windows DLL dependencies #7
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: Existing tag to build and publish | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-linux: | |
| name: Build simplex-tui-linux-x86_64 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build application and native SimpleX library | |
| run: cargo build --locked --release -p simplex-tui | |
| - name: Package release | |
| env: | |
| ASSET: simplex-tui-linux-x86_64 | |
| run: | | |
| set -euo pipefail | |
| package="dist/$ASSET" | |
| mkdir -p "$package" | |
| cp target/release/simplex-tui "$package/" | |
| cp README.md LICENSE "$package/" | |
| cp vendor/libsimplex/*.so "$package/" | |
| tar -C dist -czf "dist/$ASSET.tar.gz" "$ASSET" | |
| (cd dist && sha256sum "$ASSET.tar.gz" > "$ASSET.tar.gz.sha256") | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-linux | |
| path: | | |
| dist/simplex-tui-linux-x86_64.tar.gz | |
| dist/simplex-tui-linux-x86_64.tar.gz.sha256 | |
| if-no-files-found: error | |
| build-macos: | |
| name: Build macOS ${{ matrix.arch }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-15 | |
| arch: aarch64 | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build application and native SimpleX library | |
| run: cargo build --locked --release -p simplex-tui | |
| - name: Stage architecture files | |
| env: | |
| ARCH: ${{ matrix.arch }} | |
| run: | | |
| set -euo pipefail | |
| mkdir -p dist | |
| cp target/release/simplex-tui "dist/simplex-tui-$ARCH" | |
| cp vendor/libsimplex/libsimplex.dylib "dist/libsimplex-$ARCH.dylib" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: raw-macos-${{ matrix.arch }} | |
| path: dist/* | |
| if-no-files-found: error | |
| package-macos: | |
| name: Package simplex-tui-macos-universal | |
| needs: build-macos | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: raw-macos-* | |
| path: dist/raw | |
| merge-multiple: true | |
| - name: Create universal macOS package | |
| run: | | |
| set -euo pipefail | |
| asset="simplex-tui-macos-universal" | |
| package="dist/$asset" | |
| mkdir -p "$package" | |
| lipo -create dist/raw/simplex-tui-aarch64 dist/raw/simplex-tui-x86_64 -output "$package/simplex-tui" | |
| lipo -create dist/raw/libsimplex-aarch64.dylib dist/raw/libsimplex-x86_64.dylib -output "$package/libsimplex.dylib" | |
| chmod +x "$package/simplex-tui" | |
| cp README.md LICENSE "$package/" | |
| tar -C dist -czf "dist/$asset.tar.gz" "$asset" | |
| (cd dist && shasum -a 256 "$asset.tar.gz" > "$asset.tar.gz.sha256") | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-macos | |
| path: | | |
| dist/simplex-tui-macos-universal.tar.gz | |
| dist/simplex-tui-macos-universal.tar.gz.sha256 | |
| if-no-files-found: error | |
| build-windows: | |
| name: Build simplex-tui-windows-x86_64 | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Bootstrap libsimplex on Windows | |
| shell: pwsh | |
| run: ./scripts/bootstrap-simplex-windows.ps1 | |
| - name: Build application and native SimpleX library | |
| run: cargo build --locked --release -p simplex-tui | |
| - name: Package release | |
| shell: pwsh | |
| run: | | |
| $Asset = "simplex-tui-windows-x86_64" | |
| $Package = Join-Path "dist" $Asset | |
| New-Item -ItemType Directory -Force $Package | Out-Null | |
| Copy-Item "target/release/simplex-tui.exe" $Package | |
| Copy-Item "README.md", "LICENSE" $Package | |
| Copy-Item "vendor/libsimplex/*.dll" $Package | |
| $Archive = Join-Path "dist" "$Asset.zip" | |
| Compress-Archive -Path $Package -DestinationPath $Archive | |
| $Hash = (Get-FileHash -Algorithm SHA256 $Archive).Hash.ToLowerInvariant() | |
| "$Hash $Asset.zip" | Set-Content -NoNewline "$Archive.sha256" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-windows | |
| path: | | |
| dist/simplex-tui-windows-x86_64.zip | |
| dist/simplex-tui-windows-x86_64.zip.sha256 | |
| if-no-files-found: error | |
| publish: | |
| name: Publish GitHub release | |
| needs: [build-linux, package-macos, build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: release-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Create release through the GitHub API | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG: ${{ inputs.tag || github.ref_name }} | |
| run: | | |
| gh release create "$TAG" dist/* \ | |
| --verify-tag \ | |
| --title "simplex-tui $TAG" \ | |
| --generate-notes |