Update autohotkey to v2.0.0 (#4383) #10744
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - "main" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| ZED_EXTENSION_CLI_SHA: bb591f1e653a492c2d6c85353181e5151dbf8ac7 | |
| jobs: | |
| package: | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'zed-industries' | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| clean: false | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| - name: Cache zed-extension CLI | |
| id: cache-zed-extension | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: | | |
| zed-extension | |
| key: zed-extension-${{ env.ZED_EXTENSION_CLI_SHA }} | |
| - name: Download zed-extension CLI if not cached | |
| if: steps.cache-zed-extension.outputs.cache-hit != 'true' | |
| run: | | |
| wget --quiet "https://zed-extension-cli.nyc3.digitaloceanspaces.com/$ZED_EXTENSION_CLI_SHA/x86_64-unknown-linux-gnu/zed-extension" | |
| chmod +x zed-extension | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Cache extension build dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| key: cache-build-dependencies | |
| path: | | |
| ./scratch | |
| - name: Package extensions | |
| run: pnpm package-extensions | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| SHOULD_PUBLISH: ${{ github.ref_name == 'main' }} | |
| S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
| S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
| S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} | |
| - name: Enforce sorted `extensions.toml` and `.gitmodules` | |
| run: | | |
| if ! git diff --exit-code -- extensions.toml .gitmodules; then | |
| echo -e "\nERROR: extensions.toml and .gitmodules are not sorted." | |
| echo -e "Fix by running:\n pnpm sort-extensions\n" | |
| exit 1 | |
| fi | |
| - name: Enforce no Git LFS | |
| run: | | |
| # shellcheck disable=SC2016 | |
| git submodule foreach --quiet \ | |
| '[ ! -f .gitattributes ] || ! grep -q "filter=lfs" .gitattributes && [ ! -d .git/lfs ] || { | |
| echo "LFS detected in $path" >&2 && exit 1 | |
| }' |