Skip to content
Merged
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
26 changes: 7 additions & 19 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,37 +45,25 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# JavaScript and Python are interpreted, so CodeQL can analyze them without a build.
build-mode: none
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# Details on CodeQL's query packs refer to :
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"

Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# This is needed to get the number of commits in the current branch
fetch-depth: 0
# Deploy the exact commit that passed the test workflow.
ref: ${{ github.event.workflow_run.head_sha }}

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down Expand Up @@ -66,13 +68,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# Deploy the exact commit that passed the test workflow.
ref: ${{ github.event.workflow_run.head_sha }}

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
Expand All @@ -89,7 +94,7 @@ jobs:
CURSORLESS_DEPLOY: true

- name: Checkout cursorless.nvim plugin repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
repository: hands-free-vim/cursorless.nvim
Expand Down Expand Up @@ -118,13 +123,17 @@ jobs:
runs-on: ubuntu-latest
needs: publish-extension
environment: production
env:
DEPLOY_SHA: ${{ github.event.workflow_run.head_sha }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
# Push from the exact commit that passed the test workflow.
ref: ${{ github.event.workflow_run.head_sha }}
Comment thread
AndreasArvidsson marked this conversation as resolved.

- name: Configure GPG Key
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/forbid-todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Forbid TODO
run: ./scripts/forbid-todo.sh
10 changes: 5 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup python
uses: actions/setup-python@v6
Expand All @@ -31,7 +31,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
Expand All @@ -40,16 +40,16 @@ jobs:
run: pnpm --color install

- name: Install lua
uses: leafo/gh-actions-lua@v11
uses: leafo/gh-actions-lua@v12

- name: Install luarocks
uses: leafo/gh-actions-luarocks@v5
uses: leafo/gh-actions-luarocks@v6

- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.1

- name: Auto-fix pre-commit issues
uses: pre-commit-ci/lite-action@v1.0.2
uses: pre-commit-ci/lite-action@v1.1.0
if: always()

- name: Pyright
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
run: git config --global core.autocrlf false

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down Expand Up @@ -128,22 +128,22 @@ jobs:
if: runner.os == 'Linux' && matrix.app_version == 'stable'

- name: Upload vsix (Linux)
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: runner.os == 'Linux' && matrix.app_version == 'stable'
with:
name: vsix
path: cursorless-development.vsix

- name: Archive logs
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: logs
name: logs-${{ matrix.os }}-${{ matrix.app_version }}
path: ${{ env.VSCODE_LOGS_DIR }}
if: failure()

- name: Archive dumps
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: dumps
name: dumps-${{ matrix.os }}-${{ matrix.app_version }}
path: ${{ env.VSCODE_CRASH_DIR }}
if: failure()
8 changes: 5 additions & 3 deletions scripts/deploy-cursorless-talon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
# cherrypicking any new commits onto the cursorless-talon main branch
set -euo pipefail

: "${DEPLOY_SHA:?DEPLOY_SHA must be set}"

# Check out staging branch
git switch -c cursorless-talon-staging origin/cursorless-talon-staging

# Exit if there were no changes to the cursorless-talon directory
[[ "$(git rev-parse "${GITHUB_SHA}:cursorless-talon")" == "$(git rev-parse 'cursorless-talon-staging^{tree}')" ]] && exit 0
[[ "$(git rev-parse "${DEPLOY_SHA}:cursorless-talon")" == "$(git rev-parse 'cursorless-talon-staging^{tree}')" ]] && exit 0

# Fetch current cursorless-talon main
git remote add cursorless-talon 'https://github.com/cursorless-dev/cursorless-talon.git'
Expand All @@ -21,7 +23,7 @@ git fetch cursorless-talon
git tag cursorless-talon-staging-previous cursorless-talon-staging

# Update the staging branch
git switch -c github-sha "$GITHUB_SHA"
git switch -c github-sha "$DEPLOY_SHA"
git subtree split --prefix=cursorless-talon --branch=cursorless-talon-staging

# Sanity check that the previous staging commit is an ancestor of the new one
Expand All @@ -36,7 +38,7 @@ git cherry-pick cursorless-talon-staging-previous..cursorless-talon-staging

# Sanity check that cursorless-talon-main is identical to cursorless-talon
# subdirectory of cursorless-vscode
[[ "$(git rev-parse 'cursorless-talon-main^{tree}')" == "$(git rev-parse "${GITHUB_SHA}:cursorless-talon")" ]]
[[ "$(git rev-parse 'cursorless-talon-main^{tree}')" == "$(git rev-parse "${DEPLOY_SHA}:cursorless-talon")" ]]

# Push to cursorless-talon
git push cursorless-talon cursorless-talon-main:main
Expand Down
Loading