Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Update apt package index
run: sudo apt-get update

- name: Install LLVM
run: sudo apt-get install -y llvm

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Update apt package index
run: sudo apt-get update

- name: Install LLVM
run: sudo apt-get install -y llvm

Expand Down
180 changes: 175 additions & 5 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ jobs:
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
SM_CLIENT_CERT_FINGERPRINT: ${{ secrets.SM_CLIENT_CERT_FINGERPRINT }}

- name: Upload ggsql-jupyter kernel (win32-x64)
uses: actions/upload-artifact@v4
with:
name: ggsql-jupyter-win32-x64
path: target/release/ggsql-jupyter.exe
retention-days: 30

- name: Build NSIS installer
run: cargo packager --release --formats nsis

Expand Down Expand Up @@ -153,6 +160,13 @@ jobs:
--entitlements entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql-jupyter

- name: Upload ggsql-jupyter kernel (darwin-x64)
uses: actions/upload-artifact@v4
with:
name: ggsql-jupyter-darwin-x64
path: target/release/ggsql-jupyter
retention-days: 30

- name: Build and notarize PKG installer (x86_64)
# NOTE: --sign uses the Developer ID *Installer* cert (signs .pkg only),
# distinct from the Developer ID Application cert used to sign Mach-O above.
Expand Down Expand Up @@ -260,6 +274,13 @@ jobs:
--entitlements entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql-jupyter

- name: Upload ggsql-jupyter kernel (darwin-arm64)
uses: actions/upload-artifact@v4
with:
name: ggsql-jupyter-darwin-arm64
path: target/release/ggsql-jupyter
retention-days: 30

- name: Build and notarize PKG installer (aarch64)
# NOTE: --sign uses the Developer ID *Installer* cert (signs .pkg only),
# distinct from the Developer ID Application cert used to sign Mach-O above.
Expand Down Expand Up @@ -337,6 +358,13 @@ jobs:
- name: Build ggsql binary (x86_64)
run: cargo build --release --bin ggsql --bin ggsql-jupyter

- name: Upload ggsql-jupyter kernel (linux-x64)
uses: actions/upload-artifact@v4
with:
name: ggsql-jupyter-linux-x64
path: target/release/ggsql-jupyter
retention-days: 30

- name: Build Debian package (x86_64)
run: cargo packager --release --formats deb

Expand Down Expand Up @@ -384,6 +412,13 @@ jobs:
- name: Build ggsql binary (aarch64)
run: cargo build --release --bin ggsql --bin ggsql-jupyter

- name: Upload ggsql-jupyter kernel (linux-arm64)
uses: actions/upload-artifact@v4
with:
name: ggsql-jupyter-linux-arm64
path: target/release/ggsql-jupyter
retention-days: 30

- name: Build Debian package (aarch64)
run: cargo packager --release --formats deb

Expand Down Expand Up @@ -481,6 +516,9 @@ jobs:
# stable. ggsql-wasm/rust-toolchain.toml also selects stable for the build.
uses: dtolnay/rust-toolchain@stable

- name: Update apt package index
run: sudo apt-get update

- name: Install LLVM
run: sudo apt-get install -y llvm

Expand Down Expand Up @@ -545,6 +583,138 @@ jobs:
- name: Publish to npm
run: npm publish ./npm-tarball/*.tgz --access=public --provenance --tag ${{ steps.dist-tag.outputs.tag }}

build-vsix:
name: Build VSIX (${{ matrix.target }})
needs: [build-windows, build-macos-x86_64, build-macos-aarch64, build-linux-x86_64, build-linux-aarch64]
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
# win32-arm64 is deliberately absent: no runner builds that kernel yet.
# "universal" carries no kernel and is what users on any other platform
# install, alongside the kernel from a native installer.
target:
- darwin-arm64
- darwin-x64
- linux-arm64
- linux-x64
- win32-x64
- universal

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: ggsql-vscode/package-lock.json

- name: Install vsce
run: npm install -g @vscode/vsce

- name: Install dependencies
working-directory: ggsql-vscode
run: npm ci

- name: Download ggsql-jupyter kernel (${{ matrix.target }})
if: matrix.target != 'universal'
uses: actions/download-artifact@v4
with:
name: ggsql-jupyter-${{ matrix.target }}
path: ggsql-vscode/bundled/bin

- name: Make the kernel executable
if: matrix.target != 'universal'
run: |
chmod +x ggsql-vscode/bundled/bin/*
ls -l ggsql-vscode/bundled/bin

- name: Package VSIX
id: package
working-directory: ggsql-vscode
env:
TARGET: ${{ matrix.target }}
run: |
VERSION="$(node -p 'require("./package.json").version')"
VSIX="ggsql-${VERSION}-${TARGET}.vsix"
if [ "$TARGET" = universal ]; then
vsce package --out "$VSIX"
else
# --target writes TargetPlatform into the vsixmanifest, which is what
# Open VSX records and what Positron's bootstrap asks for by name.
vsce package --target "$TARGET" --out "$VSIX"
fi
echo "vsix=$VSIX" >> "$GITHUB_OUTPUT"

- name: Check the VSIX contents
working-directory: ggsql-vscode
env:
TARGET: ${{ matrix.target }}
VSIX: ${{ steps.package.outputs.vsix }}
run: |
unzip -l "$VSIX"
unzip -p "$VSIX" extension.vsixmanifest \
| grep -o 'TargetPlatform="[^"]*"' || echo 'no TargetPlatform: universal'
if [ "$TARGET" = universal ]; then
if unzip -l "$VSIX" | grep -q 'extension/bundled/'; then
echo "::error::the universal VSIX must not carry a kernel"
exit 1
fi
elif ! unzip -l "$VSIX" | grep -q 'extension/bundled/bin/ggsql-jupyter'; then
echo "::error::the $TARGET VSIX is missing its bundled kernel"
exit 1
fi

- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: ggsql-vsix-${{ matrix.target }}
path: ggsql-vscode/${{ steps.package.outputs.vsix }}
retention-days: 30

publish-openvsx:
name: Publish VSIX (${{ matrix.target }})
# Separate from build-vsix so that a registry failure neither blocks the
# GitHub release nor forces the VSIXes to be rebuilt on a retry.
needs: [build-vsix]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read
strategy:
fail-fast: false
matrix:
target:
- darwin-arm64
- darwin-x64
- linux-arm64
- linux-x64
- win32-x64
- universal

steps:
- name: Download VSIX
uses: actions/download-artifact@v4
with:
name: ggsql-vsix-${{ matrix.target }}
path: vsix

- name: Locate the VSIX
id: vsix
run: echo "path=$(ls vsix/*.vsix)" >> "$GITHUB_OUTPUT"

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
skipDuplicate: true
extensionFile: ${{ steps.vsix.outputs.path }}

create-release:
name: Create GitHub Release
needs: [build-windows, build-macos-x86_64, build-macos-aarch64, build-linux-x86_64, build-linux-aarch64, build-cargo, build-wasm]
Expand All @@ -566,10 +736,10 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/**/*.exe
artifacts/**/*.msi
artifacts/**/*.pkg
artifacts/**/*.deb
artifacts/**/*.tgz
artifacts/ggsql-windows-nsis/*.exe
artifacts/ggsql-windows-msi/*.msi
artifacts/ggsql-macos-pkg-*/*.pkg
artifacts/ggsql-linux-deb-*/*.deb
artifacts/ggsql-wasm-npm/*.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 0 additions & 42 deletions .github/workflows/release-vscode.yaml

This file was deleted.

Loading
Loading