forked from longtao.wu/droboticflow
78 lines
2.9 KiB
YAML
78 lines
2.9 KiB
YAML
name: drosync-release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: SemVer release version
|
|
required: true
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- run: python3 scripts/generate_drosync_contract.py --check
|
|
- run: cargo fmt --manifest-path tools/drosync/Cargo.toml --all -- --check
|
|
- run: cargo clippy --manifest-path tools/drosync/Cargo.toml --workspace --all-targets -- -D warnings
|
|
- run: cargo test --manifest-path tools/drosync/Cargo.toml --workspace
|
|
|
|
linux:
|
|
needs: verify
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- run: tools/drosync/packaging/build-release.sh linux-x86_64
|
|
env:
|
|
DROSYNC_VERSION: ${{ inputs.version }}
|
|
DROSYNC_GPG_SIGN_KEY: ${{ secrets.DROSYNC_GPG_SIGN_KEY }}
|
|
DROSYNC_DEB_SIGN_KEY: ${{ secrets.DROSYNC_GPG_SIGN_KEY }}
|
|
DROSYNC_UPDATE_PUBLIC_KEY_BASE64: ${{ secrets.DROSYNC_UPDATE_PUBLIC_KEY_BASE64 }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: drosync-linux-x86_64-${{ inputs.version }}
|
|
path: tools/drosync/dist/*
|
|
if-no-files-found: error
|
|
|
|
macos:
|
|
needs: verify
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- run: tools/drosync/packaging/build-release.sh macos-arm64
|
|
env:
|
|
DROSYNC_VERSION: ${{ inputs.version }}
|
|
DROSYNC_APPLE_APPLICATION_IDENTITY: ${{ secrets.DROSYNC_APPLE_APPLICATION_IDENTITY }}
|
|
DROSYNC_APPLE_INSTALLER_IDENTITY: ${{ secrets.DROSYNC_APPLE_INSTALLER_IDENTITY }}
|
|
DROSYNC_APPLE_NOTARY_PROFILE: ${{ secrets.DROSYNC_APPLE_NOTARY_PROFILE }}
|
|
DROSYNC_UPDATE_PUBLIC_KEY_BASE64: ${{ secrets.DROSYNC_UPDATE_PUBLIC_KEY_BASE64 }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: drosync-macos-arm64-${{ inputs.version }}
|
|
path: tools/drosync/dist/*
|
|
if-no-files-found: error
|
|
|
|
windows:
|
|
needs: verify
|
|
runs-on: windows-2022
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- run: cargo build --manifest-path tools/drosync/Cargo.toml --release --workspace --target x86_64-pc-windows-msvc
|
|
env:
|
|
DROSYNC_UPDATE_PUBLIC_KEY_BASE64: ${{ secrets.DROSYNC_UPDATE_PUBLIC_KEY_BASE64 }}
|
|
- shell: pwsh
|
|
run: tools/drosync/packaging/windows/build-msi.ps1
|
|
env:
|
|
DROSYNC_VERSION: ${{ inputs.version }}
|
|
DROSYNC_AUTHENTICODE_CERT_THUMBPRINT: ${{ secrets.DROSYNC_AUTHENTICODE_CERT_THUMBPRINT }}
|
|
DROSYNC_UPDATE_PUBLIC_KEY_BASE64: ${{ secrets.DROSYNC_UPDATE_PUBLIC_KEY_BASE64 }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: drosync-windows-x86_64-${{ inputs.version }}
|
|
path: tools/drosync/dist/*
|
|
if-no-files-found: error
|