Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,53 @@ jobs:
release-assets/latest*.yml
fail_on_unmatched_files: true

publish_aur:
name: Publish AUR package
needs: [preflight, release]
if: needs.preflight.outputs.is_prerelease == 'false'
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ needs.preflight.outputs.ref }}

- name: Download Linux AppImage artifact
uses: actions/download-artifact@v8
with:
name: desktop-linux-x64
path: release-assets

- name: Compute AppImage SHA256
id: checksum
run: |
appimage_file=$(ls release-assets/*.AppImage)
sha256=$(sha256sum "$appimage_file" | awk '{print $1}')
echo "sha256=$sha256" >> "$GITHUB_OUTPUT"
echo "AppImage SHA256: $sha256"

- name: Generate PKGBUILD
env:
PKGVER: ${{ needs.preflight.outputs.version }}
SHA256: ${{ steps.checksum.outputs.sha256 }}
run: |
sed -e "s/__PKGVER__/${PKGVER}/g" \
-e "s/__SHA256SUM__/${SHA256}/g" \
aur/PKGBUILD.template > aur/PKGBUILD

- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v4
with:
pkgname: t3code-bin
pkgbuild: aur/PKGBUILD
assets: |
aur/t3code-bin.sh
aur/t3code-bin.desktop
commit_username: github-actions[bot]
commit_email: 41898282+github-actions[bot]@users.noreply.github.com
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update to ${{ needs.preflight.outputs.version }}"

finalize:
name: Finalize release
needs: [preflight, release]
Expand Down
80 changes: 80 additions & 0 deletions aur/PKGBUILD.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Maintainer: T3 Tools <oss@t3.tools>

pkgname=t3code-bin
pkgver=__PKGVER__
pkgrel=1
pkgdesc='A minimal web GUI for coding agents'
arch=('x86_64')
url='https://github.com/pingdotgg/t3code'
license=('MIT')
depends=(
'alsa-lib'
'gtk3'
'hicolor-icon-theme'
'libnotify'
'libsecret'
'libxss'
'libxtst'
'nss'
'xdg-utils'
)
optdepends=(
'libappindicator-gtk3: systray indicator support'
)
provides=('t3code')
conflicts=('t3code')
options=('!strip' '!debug')
source=(
"${pkgname}-${pkgver}.AppImage::https://github.com/pingdotgg/t3code/releases/download/v${pkgver}/T3-Code-${pkgver}-x86_64.AppImage"
't3code-bin.sh'
't3code-bin.desktop'
)
sha256sums=(
'__SHA256SUM__'
'SKIP'
'SKIP'
)
noextract=("${pkgname}-${pkgver}.AppImage")

prepare() {
chmod +x "${srcdir}/${pkgname}-${pkgver}.AppImage"
"${srcdir}/${pkgname}-${pkgver}.AppImage" --appimage-extract
}

package() {
install -d "${pkgdir}/opt/${pkgname}"
cp -r "${srcdir}/squashfs-root/"* "${pkgdir}/opt/${pkgname}/"

# Remove AppImage-specific files
rm -f "${pkgdir}/opt/${pkgname}/AppRun"
rm -f "${pkgdir}/opt/${pkgname}/"*.desktop
rm -f "${pkgdir}/opt/${pkgname}/.DirIcon"

# Fix permissions
find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} +
find "${pkgdir}/opt/${pkgname}" -type f -exec chmod 644 {} +
chmod 755 "${pkgdir}/opt/${pkgname}/t3-code-desktop"
chmod 755 "${pkgdir}/opt/${pkgname}/chrome_crashpad_handler"
chmod 4755 "${pkgdir}/opt/${pkgname}/chrome-sandbox"

# Make shared libraries executable
find "${pkgdir}/opt/${pkgname}" -name '*.so' -exec chmod 755 {} +
find "${pkgdir}/opt/${pkgname}" -name '*.so.*' -exec chmod 755 {} +

# Launcher script
install -Dm755 "${srcdir}/t3code-bin.sh" "${pkgdir}/usr/bin/t3code"

# Desktop entry
install -Dm644 "${srcdir}/t3code-bin.desktop" \
"${pkgdir}/usr/share/applications/t3code.desktop"

# Icon
install -Dm644 "${pkgdir}/opt/${pkgname}/usr/share/icons/hicolor/1024x1024/apps/t3-code-desktop.png" \
"${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/t3code.png"

# Licenses
install -Dm644 "${pkgdir}/opt/${pkgname}/LICENSE.electron.txt" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.electron.txt"
install -Dm644 "${pkgdir}/opt/${pkgname}/LICENSES.chromium.html" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSES.chromium.html"
}
10 changes: 10 additions & 0 deletions aur/t3code-bin.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=T3 Code
Comment=A minimal web GUI for coding agents
Exec=t3code %U
Icon=t3code
Type=Application
Terminal=false
Categories=Development;IDE;
StartupWMClass=T3 Code (Alpha)
Keywords=code;coding;agent;ai;development;
13 changes: 13 additions & 0 deletions aur/t3code-bin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Launcher for T3 Code (official binary)
# User flags: ~/.config/t3code-flags.conf (one flag per line, # for comments)

XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"

T3CODE_USER_FLAGS=""
if [[ -f "${XDG_CONFIG_HOME}/t3code-flags.conf" ]]; then
T3CODE_USER_FLAGS="$(sed 's/#.*//' "${XDG_CONFIG_HOME}/t3code-flags.conf" | tr '\n' ' ')"
fi

exec /opt/t3code-bin/t3-code-desktop "$@" ${T3CODE_USER_FLAGS}