name: Release permissions: contents: write on: release: types: - "published" jobs: release: name: "Release" strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.7"] fail-fast: false runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - name: Install Cap'n Proto and libacl-dev (Linux) if: runner.os == 'Linux' run: | export DEBIAN_FRONTEND=noninteractive sudo apt-get install -y capnproto libcapnp-dev libacl1-dev - name: Install Cap'n Proto (macOS) if: runner.os == 'macOS' run: brew install capnp env: HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 - name: Install Cap'n Proto (Windows) if: runner.os == 'Windows' shell: pwsh run: | choco install capnproto echo "$Env:Programfiles\capnproto" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - uses: r7kamura/rust-problem-matchers@v1.1.0 - name: "Build binaries" timeout-minutes: 30 run: cargo build --release -p dora-runtime -p dora-coordinator -p dora-cli - name: "Create Archive (Unix)" if: runner.os == 'Linux' || runner.os == 'macOS' run: | mkdir archive cp target/release/dora-runtime archive cp target/release/dora-coordinator archive cp target/release/dora-cli archive/dora mkdir archive/iceoryx find target -type f -wholename "*/iceoryx-install/bin/iox-roudi" -exec cp {} archive/iceoryx \; find target -type f -wholename "*/iceoryx-install/share/doc/iceoryx_posh/LICENSE" -exec cp {} archive/iceoryx \; cd archive zip -r ../archive.zip . cd .. - name: Create Archive (Windows) if: runner.os == 'Windows' shell: powershell run: | New-Item -Path archive -ItemType Directory Copy-Item target/release/dora-runtime.exe -Destination archive Copy-Item target/release/dora-coordinator.exe -Destination archive Copy-Item target/release/dora-cli.exe -Destination archive/dora.exe Compress-Archive -Path archive\* -DestinationPath archive.zip - name: "Upload release asset" uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} asset_path: archive.zip asset_name: dora-${{ github.ref_name }}-x86_64-${{ runner.os }}.zip asset_content_type: application/zip # Publish Dora Node Python API - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install maturin==0.13.2 - name: Publish wheel shell: bash env: MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }} run: | cd apis/python/node maturin publish \ --no-sdist \ --skip-existing \ -o wheels \ -i python \ --username __token__ \