Files
clide/.github/workflows/release.yml
T
jpmschweitzerandClaude Opus 4.8 45aa2d924e ci: GitHub Actions — Windows tests + version-tagged release builds
- windows.yml: flutter analyze + the ConPTY/pty suite on windows-latest (the
  first real execution of lib/src/pty/windows_pty.dart). Keep out of required
  checks until reliably green (after T-424); uploads artifacts.
- release.yml: on a pubspec.yaml version bump on main, build Linux + Windows
  bundles via `make build` and publish a v<version> GitHub Release. First cut —
  Windows has never been built, so expect to iterate from the first run's logs.

GitHub is the primary remote and the only host with Windows runners; the Gitea
secondary has Actions disabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 21:41:40 +02:00

90 lines
3.2 KiB
YAML

name: release
# Build + publish versioned Windows and Linux release bundles when the version
# in pubspec.yaml changes on main. The `version` job only proceeds when the
# v<version> tag doesn't already exist, so an unrelated pubspec edit is a no-op.
#
# FIRST CUT — neither build has run in CI yet (Windows has never been built at
# all), so expect to iterate on these from the first run's logs. The repo's own
# `make` targets are the build contract (gen-build-info + clide-cli + flutter
# build, all wired in `make build`).
on:
push:
branches: [main]
paths: ['pubspec.yaml']
workflow_dispatch:
permissions:
contents: write # create the tag + the release
jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.v.outputs.version }}
fresh: ${{ steps.v.outputs.fresh }}
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 } # tags, to tell new vs. already-released
- id: v
shell: bash
run: |
version=$(awk -F': *' '/^version:/ {gsub(/[" ]/,"",$2); print $2; exit}' pubspec.yaml)
echo "version=$version" >> "$GITHUB_OUTPUT"
if git rev-parse "v$version" >/dev/null 2>&1; then
echo "fresh=false" >> "$GITHUB_OUTPUT"
echo "v$version already tagged — nothing to release."
else
echo "fresh=true" >> "$GITHUB_OUTPUT"
echo "v$version is new — building."
fi
build-linux:
needs: version
if: needs.version.outputs.fresh == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with: { channel: stable }
- run: sudo apt-get update && sudo apt-get install -y ninja-build libgtk-3-dev
- run: make dugite-fetch
- run: make build # gen-build-info + clide-cli + flutter build linux
- name: package
run: tar -C build/linux/x64/release/bundle -czf clide-linux-x64-${{ needs.version.outputs.version }}.tar.gz .
- uses: actions/upload-artifact@v4
with: { name: linux, path: clide-linux-x64-*.tar.gz }
build-windows:
needs: version
if: needs.version.outputs.fresh == 'true'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with: { channel: stable }
- run: choco install -y make
- name: build
shell: bash
run: make dugite-fetch && make build # MSVC + bash already on windows-latest
- name: package
shell: pwsh
run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath clide-windows-x64-${{ needs.version.outputs.version }}.zip
- uses: actions/upload-artifact@v4
with: { name: windows, path: clide-windows-x64-*.zip }
publish:
needs: [version, build-linux, build-windows]
if: needs.version.outputs.fresh == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with: { path: dist }
- uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.version.outputs.version }}
name: clide v${{ needs.version.outputs.version }}
files: dist/**/*
generate_release_notes: true