Skip to content

Release v0.9.2

Release v0.9.2 #134

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
cmd: pnpm incarnate:linux
- os: windows-latest
platform: win
cmd: pnpm incarnate:win
- os: macos-latest
platform: mac
cmd: pnpm incarnate:mac
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build desktop app
env:
GH_TOKEN: ${{ github.token }}
run: ${{ matrix.cmd }}
# commune, the terminal client — a single self-contained executable
# (Node SEA). Companion to the desktop app: it connects to the running
# app's CLI gateway and does nothing without it.
- name: Package terminal client
run: pnpm distill
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.platform }}
path: |
release/*.AppImage
release/*.deb
release/*.exe
release/*.dmg
release/*.zip
release/*.yml
dist-cli/abject-commune-*
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: find artifacts -type f | sort
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
tag="${GITHUB_REF_NAME}"
# release.mjs writes the drafted release notes into the tag
# annotation; use it as the release body. Bare annotations
# (old tags carried just "vX.Y.Z") fall back to auto-notes.
git fetch --force origin "refs/tags/${tag}:refs/tags/${tag}" || true
notes="$(git tag -l --format='%(contents)' "$tag")"
# The build job uploads from two roots (release/, dist-cli/), so
# the merged artifact keeps that directory structure — collect the
# files themselves. mapfile keeps names with spaces intact
# (electron-builder emits "Abject Setup X.Y.Z.exe").
mapfile -t assets < <(find artifacts -type f)
if [ "$(printf '%s' "$notes" | wc -c)" -gt 40 ]; then
printf '%s\n' "$notes" > /tmp/release-notes.md
gh release create "$tag" \
--title "Abject $tag" \
--notes-file /tmp/release-notes.md \
"${assets[@]}"
else
gh release create "$tag" \
--title "Abject $tag" \
--generate-notes \
"${assets[@]}"
fi