260cff501af61edbc5c7fe14a2e1b4e52bd0e1a0
Zed Editor Packager
Automated packaging system for Zed Editor for Debian/Ubuntu.
Description
This project automatically creates .deb packages of Zed Editor from official GitHub releases and publishes them to a Gitea repository.
Features
- Automatic version detection: Fetches the latest stable version from GitHub
- DEB package building: Creates a ready-to-install Debian package
- CI/CD with Gitea Actions: Automated workflow that:
- Checks daily for new versions
- Builds the package only if a new version is available
- Creates a Gitea release with the package
- Publishes the package to the Gitea Debian repository
Local Usage
Prerequisites
sudo apt-get install wget curl jq dpkg-dev
Manual Building
# Build the package
make
# Or step by step
make download # Download the archive
make extract # Extract the archive
make deb # Create the .deb package
# Clean up
make clean
Installation
# Install the locally created package
sudo dpkg -i build/zed-editor_*.deb
Gitea Workflow
The .gitea/workflows/build-and-release.yml workflow runs:
- Automatically: Every day at 2 AM (cron)
- Manually: Via the Gitea interface (workflow_dispatch)
- On push: On every push to the
mainbranch
Required Configuration
To publish to the Gitea Debian repository, create a PACKAGE_PUB_TOKEN secret:
- Generate a personal access token on Gitea with package permissions
- Add it as a secret in the repository settings:
PACKAGE_PUB_TOKEN
Workflow Behavior
- Version check: Compares the latest GitHub version with the latest Gitea release
- Early exit: If versions match, the workflow stops immediately
- Build: If a new version is detected, builds the .deb package
- Publishing:
- Creates a Gitea release with the version tag
- Uploads the .deb file to the release assets
- Publishes the package to the Gitea Debian repository
Package Structure
The package installs Zed in the following locations:
/opt/zed/ # Main application
/opt/zed/bin/zed # Main binary
/opt/zed/libexec/zed-editor # Editor binary
/opt/zed/lib/ # Shared libraries
/usr/bin/zed # Symbolic link
/usr/share/applications/zed.desktop # Desktop file
/usr/share/icons/hicolor/*/apps/zed.png # Icons
Installation from Gitea Repository
Once the repository is configured:
# Add the repository (adapt according to your Gitea instance)
echo "deb https://git.rawleenc.dev/api/packages/YOUR_USERNAME/debian stable main" | sudo tee /etc/apt/sources.list.d/zed-editor.list
# Install
sudo apt update
sudo apt install zed-editor
Makefile
The Makefile supports the following targets:
| Target | Description |
|---|---|
all |
Build the complete package (default target) |
download |
Download the archive from GitHub |
extract |
Extract the archive |
deb |
Create the .deb package |
clean |
Clean up temporary files |
help |
Display help |
License
This project is a packaging tool. Zed Editor itself is subject to its own license.
Notes
- The created packages are unofficial
- Binaries come directly from official Zed releases
- The packaging only adds system integration (desktop files, etc.)