From 07f04082a12cd8f019fc0b1a3d56e27b077ac788 Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Wed, 18 Nov 2026 19:41:43 +0000 Subject: [PATCH 1/2] ci: update workflow configuration --- .github/actions/setup-zig/action.yml | 34 +++++++++++++++++++++---- .github/dependabot.yml | 37 ++++++++++++++++++++++++++++ .github/workflows/ci.yml | 33 ++++++++++++++----------- .github/workflows/publish.yml | 22 +++++++++-------- .github/workflows/release-please.yml | 6 ++--- 5 files changed, 99 insertions(+), 33 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/actions/setup-zig/action.yml b/.github/actions/setup-zig/action.yml index 06730782..66163363 100644 --- a/.github/actions/setup-zig/action.yml +++ b/.github/actions/setup-zig/action.yml @@ -5,23 +5,29 @@ inputs: description: 'Zig version to install' required: true default: '0.15.2' + cache: + description: 'Reuse a cached Zig installation' + required: false + default: 'true' runs: using: 'composite' steps: - name: Cache Zig - uses: actions/cache@v4 + if: inputs.cache == 'true' + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 id: cache-zig with: path: | ~/zig - key: zig-${{ runner.os }}-${{ inputs.version }} + key: zig-v2-${{ runner.os }}-${{ inputs.version }} - name: Download and install Zig if: steps.cache-zig.outputs.cache-hit != 'true' shell: bash + env: + VERSION: ${{ inputs.version }} run: | - set -e - VERSION="${{ inputs.version }}" + set -euo pipefail # Determine platform if [[ "$OSTYPE" == "linux-gnu"* ]]; then @@ -44,8 +50,26 @@ runs: TARBALL="zig-${ARCH}-${PLATFORM}-${VERSION}.tar.xz" URL="https://ziglang.org/download/${VERSION}/${TARBALL}" + # SHA-256 of each supported tarball, from https://ziglang.org/download/ + case "${TARBALL}" in + zig-x86_64-linux-0.15.2.tar.xz) + SHA256="02aa270f183da276e5b5920b1dac44a63f1a49e55050ebde3aecc9eb82f93239" + ;; + zig-aarch64-macos-0.15.2.tar.xz) + SHA256="3cc2bab367e185cdfb27501c4b30b1b0653c28d9f73df8dc91488e66ece5fa6b" + ;; + zig-x86_64-macos-0.15.2.tar.xz) + SHA256="375b6909fc1495d16fc2c7db9538f707456bfc3373b14ee83fdd3e22b3d43f7f" + ;; + *) + echo "No checksum recorded for ${TARBALL}; add it to .github/actions/setup-zig/action.yml" + exit 1 + ;; + esac + echo "Downloading Zig ${VERSION} for ${PLATFORM}-${ARCH}..." - curl --retry 3 --retry-delay 5 -L -o "/tmp/${TARBALL}" "${URL}" + curl --fail --retry 3 --retry-delay 5 -L -o "/tmp/${TARBALL}" "${URL}" + echo "${SHA256} /tmp/${TARBALL}" | shasum -a 256 -c - # Extract to home directory mkdir -p ~/zig diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..ba15e03d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,37 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directories: + - / + - /.github/actions/setup-zig + schedule: + interval: weekly + commit-message: + prefix: ci + groups: + actions: + patterns: + - '*' + + - package-ecosystem: bun + directory: / + schedule: + interval: weekly + commit-message: + prefix: chore + groups: + tooling: + patterns: + - '*' + update-types: + - minor + - patch + + - package-ecosystem: bun + directory: /demo + schedule: + interval: weekly + commit-message: + prefix: deps + ignore: + - dependency-name: ghostty-web diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c86f4298..75238972 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,16 +6,19 @@ on: pull_request: workflow_dispatch: +permissions: + contents: read + jobs: fmt: name: fmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - name: Install dependencies run: bun install @@ -27,11 +30,11 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - name: Install dependencies run: bun install @@ -43,11 +46,11 @@ jobs: name: type check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - name: Install dependencies run: bun install @@ -59,13 +62,13 @@ jobs: name: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: submodules: recursive - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - uses: ./.github/actions/setup-zig with: @@ -84,13 +87,13 @@ jobs: name: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: submodules: recursive - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - uses: ./.github/actions/setup-zig with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 83eee19d..c4884660 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -49,7 +49,7 @@ jobs: echo "npm_tag=$NPM_TAG" >> "$GITHUB_OUTPUT" - name: Checkout tag - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: ref: ${{ steps.tag.outputs.tag }} fetch-depth: 0 @@ -79,14 +79,15 @@ jobs: NODE - name: Setup Bun - uses: oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - name: Setup Zig uses: ./.github/actions/setup-zig with: version: 0.15.2 + cache: 'false' - name: Install dependencies run: bun install --frozen-lockfile @@ -116,13 +117,13 @@ jobs: fi - name: Setup Node.js for npm - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '24.22.1' registry-url: 'https://registry.npmjs.org' - name: Ensure current npm for trusted publishing - run: npm install -g npm@latest + run: npm install -g npm@12.2.3 - name: Publish ghostty-web env: @@ -180,7 +181,7 @@ jobs: github.event.workflow_run.head_repository.full_name == github.repository steps: - name: Checkout CI head - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: ref: ${{ github.event.workflow_run.head_sha }} fetch-depth: 0 @@ -203,15 +204,16 @@ jobs: - name: Setup Bun if: steps.release-commit.outputs.skip != 'true' - uses: oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - name: Setup Zig if: steps.release-commit.outputs.skip != 'true' uses: ./.github/actions/setup-zig with: version: 0.15.2 + cache: 'false' - name: Install dependencies if: steps.release-commit.outputs.skip != 'true' @@ -223,14 +225,14 @@ jobs: - name: Setup Node.js for npm if: steps.release-commit.outputs.skip != 'true' - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '24.22.1' registry-url: 'https://registry.npmjs.org' - name: Ensure current npm for trusted publishing if: steps.release-commit.outputs.skip != 'true' - run: npm install -g npm@latest + run: npm install -g npm@12.2.3 - name: Compute next version if: steps.release-commit.outputs.skip != 'true' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 03a36bc9..03bf2c06 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -21,15 +21,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout main - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: fetch-depth: 0 persist-credentials: false - name: Setup Bun - uses: oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: - bun-version: latest + bun-version: 1.4.4 - name: Install dependencies env: From 2543fcb810391cb5fffee5643db5b70811dc73cc Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Wed, 18 Nov 2026 20:29:49 +0000 Subject: [PATCH 2/2] ci: adjust workflow configuration --- .github/CODEOWNERS | 11 +++++++++++ .github/workflows/ci.yml | 18 +++++++++++++----- .github/workflows/publish.yml | 22 ++++++++++------------ 3 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..06c63f91 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,11 @@ +/.github/ @coder/ghostty-web-maintainers +/scripts/ @coder/ghostty-web-maintainers +/patches/ @coder/ghostty-web-maintainers +/ghostty @coder/ghostty-web-maintainers +/.gitmodules @coder/ghostty-web-maintainers +/package.json @coder/ghostty-web-maintainers +/bun.lock @coder/ghostty-web-maintainers +/demo/package.json @coder/ghostty-web-maintainers +/demo/bun.lock @coder/ghostty-web-maintainers +/vite.config.js @coder/ghostty-web-maintainers +/release-please-config.json @coder/ghostty-web-maintainers diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75238972..9889de4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: bun-version: 1.4.4 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Check formatting run: bun run fmt @@ -31,13 +33,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: bun-version: 1.4.4 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Run linter run: bun run lint @@ -47,13 +51,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: bun-version: 1.4.4 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Check types run: bun run typecheck @@ -65,6 +71,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: submodules: recursive + persist-credentials: false - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: @@ -78,7 +85,7 @@ jobs: run: ./scripts/build-wasm.sh - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Run tests run: bun test @@ -90,6 +97,7 @@ jobs: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: submodules: recursive + persist-credentials: false - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 with: @@ -112,7 +120,7 @@ jobs: fi - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Build library run: bun run build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c4884660..83eee19d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -49,7 +49,7 @@ jobs: echo "npm_tag=$NPM_TAG" >> "$GITHUB_OUTPUT" - name: Checkout tag - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@v4 with: ref: ${{ steps.tag.outputs.tag }} fetch-depth: 0 @@ -79,15 +79,14 @@ jobs: NODE - name: Setup Bun - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 + uses: oven-sh/setup-bun@v1 with: - bun-version: 1.4.4 + bun-version: latest - name: Setup Zig uses: ./.github/actions/setup-zig with: version: 0.15.2 - cache: 'false' - name: Install dependencies run: bun install --frozen-lockfile @@ -117,13 +116,13 @@ jobs: fi - name: Setup Node.js for npm - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + uses: actions/setup-node@v4 with: node-version: '24.22.1' registry-url: 'https://registry.npmjs.org' - name: Ensure current npm for trusted publishing - run: npm install -g npm@12.2.3 + run: npm install -g npm@latest - name: Publish ghostty-web env: @@ -181,7 +180,7 @@ jobs: github.event.workflow_run.head_repository.full_name == github.repository steps: - name: Checkout CI head - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@v4 with: ref: ${{ github.event.workflow_run.head_sha }} fetch-depth: 0 @@ -204,16 +203,15 @@ jobs: - name: Setup Bun if: steps.release-commit.outputs.skip != 'true' - uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2 + uses: oven-sh/setup-bun@v1 with: - bun-version: 1.4.4 + bun-version: latest - name: Setup Zig if: steps.release-commit.outputs.skip != 'true' uses: ./.github/actions/setup-zig with: version: 0.15.2 - cache: 'false' - name: Install dependencies if: steps.release-commit.outputs.skip != 'true' @@ -225,14 +223,14 @@ jobs: - name: Setup Node.js for npm if: steps.release-commit.outputs.skip != 'true' - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + uses: actions/setup-node@v4 with: node-version: '24.22.1' registry-url: 'https://registry.npmjs.org' - name: Ensure current npm for trusted publishing if: steps.release-commit.outputs.skip != 'true' - run: npm install -g npm@12.2.3 + run: npm install -g npm@latest - name: Compute next version if: steps.release-commit.outputs.skip != 'true'