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
19 changes: 15 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
types: [completed]
branches: [main]

permissions:
contents: write

jobs:
publish-extension:
name: Publish to marketplace
Expand All @@ -23,19 +26,22 @@ jobs:
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm

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

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

- name: Create Git tag
- name: Check whether this version is already published
run: |
git tag ${{ env.version }}
git push origin ${{ env.version }}
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 Open VSX Registry
id: publishToOpenVSX
Expand All @@ -49,3 +55,8 @@ jobs:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}

- name: Create Git tag
run: |
git tag "${{ env.version }}"
git push origin "${{ env.version }}"
7 changes: 5 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand All @@ -20,6 +22,7 @@ jobs:
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm --color ci
Expand Down
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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "parse-tree",
"displayName": "Parse tree",
"description": "Access document syntax using tree-sitter",
"version": "0.54.0",
"version": "0.55.0",
"publisher": "pokey",
"repository": {
"type": "git",
Expand Down Expand Up @@ -82,7 +82,7 @@
"scripts": {
"clean": "rm -rf ./out && rm -rf parsers",
"vscode:prepublish": "npm run build",
"build": "tsc -p ./ && npm run copy-assets",
"build": "tsc -p . && npm run copy-assets",
"copy-assets": "sh copy-assets.sh",
"lint": "npm run typecheck && npm run lint:ts && npm run lint:fmt",
"typecheck": "tsc -p . --noEmit",
Expand Down