[Release]

Tag-driven LSP multi-platform Nuitka binaries, VSIX packaging, GitHub Releases, and Marketplace publish.

Release

Abstract

A PYNE release is a multi-artifact event, not a single wheel upload. The primary automation (.github/workflows/release.yml) builds platform-native Language Server binaries with Nuitka, packages the VS Code extension, attaches them to a GitHub Release, and optionally publishes to the VS Code Marketplace.

Library wheels may still be built separately via hatch / PyPI workflows; the documented release pipeline optimizes for editor distribution (LSP + VSIX).

Conceptual model

Interface surface

Triggers

EventBehavior
Push tag matching v*Full build + create release + marketplace publish
workflow_dispatch with version inputManual build path (release job still gated on tag push condition)

Jobs

JobMatrix / OSOutput
build-lspubuntu-latest, windows-latest, macos-latestNamed artifacts: pynescript-lsp-linux-x86_64, …-windows-x86_64.exe, …-macos-arm64
build-vscodeubuntu-latestpynescript-vscode-extension VSIX
releaseneeds both; only if tag pushGitHub Release body + asset globs
publish-vscodeneeds VSIX; only if tag pushvsce publish --pat

Environment

env:
  PYTHON_VERSION: "3.12"
  NUITKA_JOBS: 4

Build steps rely on:

pip install nuitka==2.0.* cryptography
python scripts/build/compile.py --no-encrypt --check   # metadata stage
python scripts/build/ci_build.py --jobs 4
# CRYPTO_KEY from secrets.METADATA_KEY

Local make-side packaging

make build          # scripts/build/compile.py --jobs=4
make build-vscode   # npm install && compile && vsce package

Artifacts land under dist/lsp/, dist/vsix/, and vscode-extension/*.vsix depending on script path.

Internals

PathRole
.github/workflows/release.ymlOrchestration
scripts/build/ci_build.pyCI-oriented Nuitka + metadata encrypt
scripts/build/compile.pyLocal/full compile options (--onefile, --standalone, --check)
vscode-extension/package.jsonExtension version / engines
src/pynescript/__about__.pyHatch dynamic version for Python package

Release asset contract (from release body)

ArtifactInstall sketch
pynescript-lsp-linux-x86_64chmod +x/usr/local/bin/pynescript-lsp
pynescript-lsp-windows-x86_64.exePlace on PATH
pynescript-lsp-macos-arm64Place on PATH (Apple Silicon runners)
pynescript-*.vsixcode --install-extension pynescript-*.vsix

Invariants & edge cases

  1. CRYPTO_KEY must be stable across builds if you care about byte-identical builtin_metadata.json.enc. Supply secrets.METADATA_KEY.
  2. Tag name is the version source for the GitHub Release title (v prefix stripped).
  3. Marketplace publish needs VSCE_PAT. Without it, packaging may still succeed while publish fails.
  4. Artifact retention is short (5 days on build jobs) — releases must attach files immediately.
  5. macOS artifact is ARM64 from macos-latest — Intel Mac users may need separate builds if required.
  6. Draft vs prerelease: workflow currently sets draft: false, prerelease: false for tag releases.

Worked examples

Cut a release

# ensure main is green
git checkout main && git pull
# bump versions in extension / __about__ as needed
git tag -a v0.3.0 -m "v0.3.0"
git push origin v0.3.0
# watch Actions → Build & Release LSP

Smoke-test a downloaded binary

chmod +x pynescript-lsp-linux-x86_64
./pynescript-lsp-linux-x86_64 --help
# or wire stdio into an editor client

Failure modes

SymptomCauseFix
Binary not found after NuitkaPath layout drift in ci_build.pyInspect dist/; fix finder step
Decrypt errors in fieldKey mismatch between encrypt and runtimeAlign METADATA_KEY with embedded key strategy
Empty GitHub Release assetsArtifact download path mismatchMatch files: globs to download-artifact layout
Marketplace 401Bad/expired VSCE_PATRotate PAT with Marketplace scopes
Windows .exe not marked executableFinder uses -type f -executableFallback non-executable find branch in workflow

See also