Updates
CI / test (push) Successful in 57s
Release rolling / release (push) Successful in 4m45s

This commit is contained in:
Raven Scott
2026-07-18 16:41:09 -04:00
parent f7e26d1aac
commit d56c6757a5
24 changed files with 9935 additions and 203 deletions
+73 -15
View File
@@ -1,3 +1,4 @@
# Versioned GitHub Release — same host matrix as Gitea rolling (Linux servers + all client arches).
name: Release
on:
@@ -5,6 +6,10 @@ on:
tags: ['v*']
workflow_dispatch:
inputs:
skip_client:
description: 'Skip Electron client builds (server only)'
required: false
default: 'false'
dry_run:
description: 'Build artifacts without uploading'
required: false
@@ -13,10 +18,17 @@ on:
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: '--dns-result-order=ipv4first'
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
@@ -24,27 +36,73 @@ jobs:
with:
node-version: '22'
- name: Install + test
run: |
npm install --no-audit --no-fund
SKIP_INTEGRATION=1 npm test
- name: Pack source tarball
- name: Install system deps
timeout-minutes: 8
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME:-manual}"
NAME="peardata-${VERSION}"
mkdir -p dist
tar --exclude=node_modules --exclude=.git --exclude=data --exclude=dist \
-czf "dist/${NAME}.tar.gz" .
(cd dist && sha256sum "${NAME}.tar.gz" > "${NAME}.tar.gz.sha256")
ls -la dist
APT_OPTS=(-o Acquire::ForceIPv4=true -o Acquire::Retries=3)
sudo apt-get update -qq "${APT_OPTS[@]}" || true
sudo apt-get install -y -qq "${APT_OPTS[@]}" \
libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2t64 zip unzip ca-certificates
- name: Install dependencies
timeout-minutes: 15
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
GIT_TERMINAL_PROMPT: '0'
run: |
set -euo pipefail
git config --global url."https://github.com/".insteadOf "ssh://[email protected]/"
git config --global url."https://github.com/".insteadOf "[email protected]:"
npm ci --ignore-scripts --no-audit --no-fund
node node_modules/esbuild/install.js
- name: Unit tests
env:
SKIP_INTEGRATION: '1'
run: npm test
- name: Install rcodesign
run: |
set -euo pipefail
ARCH="$(uname -m)"
case "$ARCH" in
x86_64|amd64) HOST=linux-x64 ;;
aarch64|arm64) HOST=linux-arm64 ;;
*) exit 1 ;;
esac
sudo install -m 0755 "tools/rcodesign/${HOST}/rcodesign" /usr/local/bin/rcodesign
rcodesign --version
- name: Build server + client archives
env:
PEARDATA_SERVER_HOSTS: linux-x64,linux-arm64
PEARDATA_CLIENT_HOSTS: linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64
PEARDATA_SKIP_CLIENT: ${{ github.event.inputs.skip_client == 'true' && '1' || '0' }}
DRY_RUN: '1'
RELEASE_TAG: ${{ github.ref_name || 'manual' }}
npm_config_build_from_source: 'false'
PEARDATA_SKIP_REBUILD: '1'
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
electron_config_cache: ${{ github.workspace }}/.cache/electron
PEARDATA_CLIENT_TIMEOUT_MS: '480000'
CI: 'true'
run: |
set -euo pipefail
mkdir -p "$ELECTRON_CACHE" .cache/electron-zips
chmod +x scripts/gitea-rolling-release.sh scripts/bare-standalone.cjs scripts/make.cjs
# Stage into dist/release without uploading (DRY_RUN=1)
bash scripts/gitea-rolling-release.sh
ls -la dist/release
- name: Upload GitHub Release
if: startsWith(github.ref, 'refs/tags/') && github.event.inputs.dry_run != 'true'
uses: softprops/action-gh-release@v2
with:
files: dist/*
files: dist/release/*
generate_release_notes: true
body_path: dist/release/RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}