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
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy

on:
workflow_run:
workflows: [Test]
types: [completed]
branches: [main]

permissions:
id-token: write
contents: write

jobs:
publish-npm:
name: Publish to NPM
runs-on: ubuntu-latest
environment: production
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.head_sha }}

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm --color ci

- name: Build
run: npm --color run build

- name: Read version from package.json
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=v$VERSION" >> $GITHUB_ENV

- name: Check whether this version is already published
run: |
if git ls-remote --exit-code --tags origin "refs/tags/${{ env.version }}" > /dev/null; then
echo "Version ${{ env.version }} is already tagged."
exit 1
fi

- name: Publish to NPM
run: npx -y npm@11.6.2 publish --access public

- name: Create Git tag
run: |
git tag ${{ env.version }}
git push origin ${{ env.version }}
2 changes: 1 addition & 1 deletion dist/snippetFormatter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/snippetFormatter.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/talonFormatter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/talonFormatter.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/treeSitterFormatter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/treeSitterFormatter.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cursorless/talon-tools",
"version": "0.10.1",
"version": "0.10.2",
"description": "Linting and formatting tools for Talon and Cursorless",
"author": "Cursorless Dev",
"license": "MIT",
Expand Down