name: release on: push: tags: ['v*'] workflow_dispatch: jobs: linux: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Linux build deps # media_kit_video links libmpv + epoxy via pkg-config. Runner images # differ: some run as root without sudo. run: | SUDO=sudo; [ "$(id -u)" = 0 ] && SUDO= $SUDO apt-get update $SUDO apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev \ liblzma-dev g++ libmpv-dev libepoxy-dev xz-utils unzip curl python3 - name: Setup Flutter (stable) run: | git clone https://github.com/flutter/flutter.git -b stable --depth 1 ~/flutter echo "$HOME/flutter/bin" >> $GITHUB_PATH - name: Build tarball run: tool/package_linux.sh - name: Publish release if: startsWith(github.ref, 'refs/tags/v') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | VER="${GITHUB_REF_NAME#v}" dart tool/release_publish.dart "$GITHUB_REF_NAME" "dist/watch-together-$VER-linux-x64.tar.gz" windows: # yuuka-windows: host-mode runner (no containers), runs as SYSTEM, has # git + VS 2022 Build Tools but no bash/python — PowerShell and Dart # only. Checkout is plain git: that host's cached actions/checkout # clone was corrupt, and no `uses:` means no action cache to rot. runs-on: windows-latest steps: - name: Checkout shell: powershell run: | git init -q . git remote add origin "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY.git" git fetch -q --tags origin "$env:GITHUB_SHA" if ($LASTEXITCODE) { exit 1 } git checkout -q --force FETCH_HEAD - name: Setup Flutter shell: powershell run: powershell -NoProfile -ExecutionPolicy Bypass -File tool/setup_flutter_windows.ps1 - name: Build zip shell: powershell run: powershell -NoProfile -ExecutionPolicy Bypass -File tool/package_windows.ps1 - name: Publish release if: startsWith(github.ref, 'refs/tags/v') shell: powershell env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | $Ver = $env:GITHUB_REF_NAME.TrimStart('v') dart tool/release_publish.dart $env:GITHUB_REF_NAME "dist/watch-together-$Ver-windows-x64.zip" if ($LASTEXITCODE) { exit 1 }