Skip to content

Fix sync plan payload size limit #30

Fix sync plan payload size limit

Fix sync plan payload size limit #30

Workflow file for this run

name: Build and Release
on:
push:
branches: [main]
tags:
- "v*"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
BINARY_NAME: tt-sync
jobs:
build-linux-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test --locked
- name: Package
run: |
mkdir -p dist
cp target/release/${{ env.BINARY_NAME }} dist/${{ env.BINARY_NAME }}-linux-x64
chmod +x dist/${{ env.BINARY_NAME }}-linux-x64
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: ${{ env.BINARY_NAME }}-linux-x64
path: dist/${{ env.BINARY_NAME }}-linux-x64
build-linux-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Package
run: |
mkdir -p dist
cp target/release/${{ env.BINARY_NAME }} dist/${{ env.BINARY_NAME }}-linux-arm64
chmod +x dist/${{ env.BINARY_NAME }}-linux-arm64
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: ${{ env.BINARY_NAME }}-linux-arm64
path: dist/${{ env.BINARY_NAME }}-linux-arm64
build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Package
run: |
mkdir dist
copy target\release\${{ env.BINARY_NAME }}.exe dist\${{ env.BINARY_NAME }}-windows-x64.exe
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: ${{ env.BINARY_NAME }}-windows-x64
path: dist/${{ env.BINARY_NAME }}-windows-x64.exe
build-macos-x64:
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Package
run: |
mkdir -p dist
cp target/release/${{ env.BINARY_NAME }} dist/${{ env.BINARY_NAME }}-macos-x64
chmod +x dist/${{ env.BINARY_NAME }}-macos-x64
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: ${{ env.BINARY_NAME }}-macos-x64
path: dist/${{ env.BINARY_NAME }}-macos-x64
build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Package
run: |
mkdir -p dist
cp target/release/${{ env.BINARY_NAME }} dist/${{ env.BINARY_NAME }}-macos-arm64
chmod +x dist/${{ env.BINARY_NAME }}-macos-arm64
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: ${{ env.BINARY_NAME }}-macos-arm64
path: dist/${{ env.BINARY_NAME }}-macos-arm64
release:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
needs:
- build-linux-x64
- build-linux-arm64
- build-windows-x64
- build-macos-x64
- build-macos-arm64
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Prepare release files
run: |
mkdir -p release
find artifacts -type f -exec cp {} release/ \;
(
cd release
sha256sum * > SHA256SUMS.txt
)
ls -la release/
- name: Get version from Cargo.toml
id: version
run: |
VERSION=$(grep '^version' crates/ttsync-cli/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Get short SHA
id: sha
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get build timestamp
id: built_at
run: echo "value=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Publish nightly pre-release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
name: Nightly Build v${{ steps.version.outputs.version }} (${{ steps.sha.outputs.sha }})
body: |
## Nightly Build
**Version:** ${{ steps.version.outputs.version }}
**Commit:** ${{ github.sha }}
**Built:** ${{ steps.built_at.outputs.value }}
### Downloads
| Platform | Architecture | File |
|----------|--------------|------|
| Linux | x86_64 | `tt-sync-linux-x64` |
| Linux | ARM64 | `tt-sync-linux-arm64` |
| Windows | x86_64 | `tt-sync-windows-x64.exe` |
| macOS | x86_64 (Intel) | `tt-sync-macos-x64` |
| macOS | ARM64 (Apple Silicon) | `tt-sync-macos-arm64` |
### Install
Linux / macOS:
```bash
curl -fsSL https://raw.githubusercontent.com/Darkatse/TT-Sync/main/scripts/install.sh | sh -s -- --nightly
```
Windows PowerShell:
```powershell
& ([scriptblock]::Create((iwr https://raw.githubusercontent.com/Darkatse/TT-Sync/main/scripts/install.ps1).Content)) -Nightly
```
### Integrity
`SHA256SUMS.txt` is attached to this release and used by the install scripts for checksum verification.
prerelease: true
overwrite_files: true
files: release/*
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish stable release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: TT-Sync ${{ github.ref_name }}
body: |
## TT-Sync ${{ github.ref_name }}
**Version:** ${{ steps.version.outputs.version }}
**Commit:** ${{ github.sha }}
**Built:** ${{ steps.built_at.outputs.value }}
### Downloads
| Platform | Architecture | File |
|----------|--------------|------|
| Linux | x86_64 | `tt-sync-linux-x64` |
| Linux | ARM64 | `tt-sync-linux-arm64` |
| Windows | x86_64 | `tt-sync-windows-x64.exe` |
| macOS | x86_64 (Intel) | `tt-sync-macos-x64` |
| macOS | ARM64 (Apple Silicon) | `tt-sync-macos-arm64` |
### Install
Linux / macOS:
```bash
curl -fsSL https://raw.githubusercontent.com/Darkatse/TT-Sync/main/scripts/install.sh | sh
```
Windows PowerShell:
```powershell
iex ((iwr https://raw.githubusercontent.com/Darkatse/TT-Sync/main/scripts/install.ps1).Content)
```
### Integrity
`SHA256SUMS.txt` is attached to this release and used by the install scripts for checksum verification.
prerelease: false
overwrite_files: true
files: release/*
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}