Skip to content

chore: release v0.0.9 #55

chore: release v0.0.9

chore: release v0.0.9 #55

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
env:
RUST_LOG: info
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Linux x86_64 ──────────────────────────────────────────────────────
build-linux-x86_64:
name: build Linux x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install system dependencies (apt)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential git pkg-config cmake m4 \
libssl-dev fontconfig libfontconfig1-dev libfreetype-dev \
libharfbuzz-dev libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libxkbcommon-dev libxkbcommon-x11-dev \
libwayland-dev wayland-protocols \
libxcb1-dev libxrandr-dev libxinerama-dev \
libxi-dev libxcursor-dev mesa-vulkan-drivers libvulkan-dev \
libdbus-1-dev libsystemd-dev libsqlite3-dev \
libxml2-dev gnutls-bin libgnutls28-dev rpm
- name: Install Rust toolchain (from rust-toolchain.toml)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.95.0
- name: Cache cargo registry & target
uses: Swatinem/rust-cache@v2
with:
shared-key: linux-x86_64
cache-bin: false
save-if: true
cache-on-failure: true
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: Install linuxdeploy
uses: AnimMouse/setup-appimage@v2
with:
filename: linuxdeploy
url: https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
cache_key: continuous
- name: Install appimagetool
uses: AnimMouse/setup-appimage@v2
with:
filename: appimagetool
url: https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
cache_key: continuous
- name: Build release binaries
run: cargo xtask fresh-build --release
- name: Set version env
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Package tarball (x86_64-unknown-linux-gnu)
run: |
TARGET=x86_64-unknown-linux-gnu
STAGING="neomacs-${VERSION}-${TARGET}"
mkdir -p "$STAGING"
cp target/release/neomacs "$STAGING/"
cp target/release/neomacs.pdump "$STAGING/"
cp -r lisp "$STAGING/"
cp -r etc "$STAGING/"
cp COPYING "$STAGING/"
mkdir -p dist
tar czf "dist/${STAGING}.tar.gz" "$STAGING"
- name: Package AppImage
run: ./scripts/package-appimage.sh --skip-build --no-smoke
- name: Package .deb
run: ./scripts/package-deb.sh --skip-build --no-smoke
- name: Package .rpm
run: ./scripts/package-rpm.sh --skip-build --no-smoke
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: linux-x86_64
path: |
dist/*.tar.gz
dist/*.AppImage
dist/*.deb
dist/*.rpm
if-no-files-found: error
# ── Linux aarch64 ─────────────────────────────────────────────────────
build-linux-aarch64:
name: build Linux aarch64
runs-on: ubuntu-24.04-arm
timeout-minutes: 120
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install system dependencies (apt)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential git pkg-config cmake m4 \
libssl-dev fontconfig libfontconfig1-dev libfreetype-dev \
libharfbuzz-dev libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libxkbcommon-dev libxkbcommon-x11-dev \
libwayland-dev wayland-protocols \
libxcb1-dev libxrandr-dev libxinerama-dev \
libxi-dev libxcursor-dev mesa-vulkan-drivers libvulkan-dev \
libdbus-1-dev libsystemd-dev libsqlite3-dev \
libxml2-dev gnutls-bin libgnutls28-dev
- name: Install Rust toolchain (from rust-toolchain.toml)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.95.0
targets: aarch64-unknown-linux-gnu
- name: Cache cargo registry & target
uses: Swatinem/rust-cache@v2
with:
shared-key: linux-aarch64
cache-bin: false
save-if: true
cache-on-failure: true
- name: Build release binaries
run: cargo xtask fresh-build --release
- name: Set version env
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Package tarball (aarch64-unknown-linux-gnu)
run: |
TARGET=aarch64-unknown-linux-gnu
STAGING="neomacs-${VERSION}-${TARGET}"
mkdir -p "$STAGING"
cp target/release/neomacs "$STAGING/"
cp target/release/neomacs.pdump "$STAGING/"
cp -r lisp "$STAGING/"
cp -r etc "$STAGING/"
cp COPYING "$STAGING/"
mkdir -p dist
tar czf "dist/${STAGING}.tar.gz" "$STAGING"
- name: Upload Linux aarch64 artifacts
uses: actions/upload-artifact@v4
with:
name: linux-aarch64
path: dist/*.tar.gz
if-no-files-found: error
# ── macOS aarch64 (Apple Silicon) ─────────────────────────────────────
build-macos-aarch64:
name: build macOS aarch64
runs-on: macos-latest
timeout-minutes: 120
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
GSTREAMER_VERSION: 1.26.9
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install system dependencies (brew)
run: brew install pkg-config gstreamer
- name: Install Rust toolchain (from rust-toolchain.toml)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.95.0
targets: aarch64-apple-darwin
- name: Cache cargo registry & target
uses: Swatinem/rust-cache@v2
with:
shared-key: macos-aarch64
cache-bin: false
save-if: true
cache-on-failure: true
- name: Set version env
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Build release binaries
run: cargo xtask fresh-build --release
- name: Package tarball (aarch64-apple-darwin)
run: |
TARGET=aarch64-apple-darwin
STAGING="neomacs-${VERSION}-${TARGET}"
mkdir -p "$STAGING"
cp target/release/neomacs "$STAGING/"
cp target/release/neomacs.pdump "$STAGING/"
cp -r lisp "$STAGING/"
cp -r etc "$STAGING/"
cp COPYING "$STAGING/"
mkdir -p dist
tar czf "dist/${STAGING}.tar.gz" "$STAGING"
- name: Build and package .app + .dmg
run: ./scripts/package-macos-app.sh --no-smoke
- name: Upload macOS aarch64 artifacts
uses: actions/upload-artifact@v4
with:
name: macos-aarch64
path: |
dist/*.tar.gz
dist/*.dmg
if-no-files-found: error
# ── Windows x86_64 ────────────────────────────────────────────────────
build-windows-x86_64:
name: build Windows x86_64
runs-on: windows-latest
timeout-minutes: 180
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
GSTREAMER_VERSION: 1.26.9
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Rust toolchain (from rust-toolchain.toml)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.95.0
targets: x86_64-pc-windows-msvc
- name: Restore GStreamer SDK cache
id: cache-gstreamer
uses: actions/cache/restore@v4
with:
path: |
C:\gstreamer
C:\gstreamer-msi-cache
key: windows-gstreamer-msvc-x86_64-${{ env.GSTREAMER_VERSION }}-v1
- name: Install GStreamer SDK
if: steps.cache-gstreamer.outputs.cache-hit != 'true'
shell: powershell
run: ./scripts/setup-windows-gstreamer.ps1 -Install
- name: Save GStreamer SDK cache
if: steps.cache-gstreamer.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
C:\gstreamer
C:\gstreamer-msi-cache
key: ${{ steps.cache-gstreamer.outputs.cache-primary-key }}
- name: Configure GStreamer SDK
shell: powershell
run: ./scripts/setup-windows-gstreamer.ps1
- name: Cache cargo registry & target
uses: Swatinem/rust-cache@v2
with:
shared-key: windows-msvc-x86_64
cache-bin: false
save-if: true
cache-on-failure: true
- name: Install NSIS
run: choco install nsis -y
- name: Add NSIS to PATH
shell: powershell
run: Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files (x86)\NSIS"
- name: Verify GStreamer pkg-config
shell: bash
run: source scripts/windows-gstreamer-env.sh --verify
- name: Build release binaries
shell: bash
timeout-minutes: 150
run: |
source scripts/windows-gstreamer-env.sh
# The pdump generation runs neomacs, whose startup expands `~`. The
# minimal CI build environment sets USERPROFILE/APPDATA but not HOME,
# so `~` would stay literal and `directory-files "~"` would fail. Give
# it HOME explicitly (a real Windows session always has one; GNU's
# w32.c init_environment likewise guarantees HOME is set).
export HOME="${USERPROFILE:-$GITHUB_WORKSPACE}"
cargo xtask fresh-build --release
- name: Set version env (bash)
shell: bash
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Install zip
run: choco install zip -y --no-progress
- name: Package zip (x86_64-pc-windows-msvc)
shell: bash
run: |
TARGET=x86_64-pc-windows-msvc
STAGING="neomacs-${VERSION}-${TARGET}"
mkdir -p "$STAGING"
cp target/release/neomacs.exe "$STAGING/"
cp target/release/neomacs.pdump "$STAGING/"
cp -r lisp "$STAGING/"
cp -r etc "$STAGING/"
cp COPYING "$STAGING/"
./scripts/vendor-windows-gstreamer-runtime.sh \
--package-root "$STAGING" \
--bin-dir "$STAGING"
mkdir -p dist
zip -r "dist/${STAGING}.zip" "$STAGING"
- name: Package .exe installer
shell: bash
timeout-minutes: 20
run: |
source scripts/windows-gstreamer-env.sh
./scripts/package-windows-installer.sh --skip-build --no-smoke
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-x86_64
path: |
dist/*.zip
dist/*.exe
if-no-files-found: error
# ── GitHub Release ────────────────────────────────────────────────────
create-release:
name: create release
needs:
- build-linux-x86_64
- build-linux-aarch64
- build-macos-aarch64
- build-windows-x86_64
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: NEO Emacs ${{ github.ref_name }}
files: dist/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}