-
-
Notifications
You must be signed in to change notification settings - Fork 10
Update build tooling #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| * @cursorless-dev/code-owners | ||
| * @cursorless-dev/code-owners |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,62 @@ | ||
| name: Deploy | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_run: | ||
| workflows: [Test] | ||
| types: [completed] | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| publish-extension: | ||
| name: Publish to marketplace | ||
| runs-on: ubuntu-latest | ||
| environment: production | ||
| environment: Production | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ github.event.workflow_run.head_sha }} | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| cache: yarn | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install | ||
| run: npm --color ci | ||
|
|
||
| - name: Read version from package.json | ||
| run: | | ||
| VERSION=$(node -p "require('./package.json').version") | ||
| echo "version=$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 | ||
|
AndreasArvidsson marked this conversation as resolved.
|
||
| fi | ||
|
|
||
| - name: Publish to Open VSX Registry | ||
| id: publishToOpenVSX | ||
| uses: HaaLeo/publish-vscode-extension@v1 | ||
| uses: HaaLeo/publish-vscode-extension@v2 | ||
| with: | ||
| pat: ${{ secrets.OPEN_VSX_TOKEN }} | ||
|
|
||
| - name: Publish to Visual Studio Marketplace | ||
| uses: HaaLeo/publish-vscode-extension@v1 | ||
| uses: HaaLeo/publish-vscode-extension@v2 | ||
| with: | ||
| 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 }}" | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| run-tests: | ||
| name: Run tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - 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: Run lint | ||
| run: npm --color run lint | ||
|
|
||
| - name: Run tests | ||
| run: xvfb-run -a npm --color run test:ci |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v21.1.0 | ||
| v24.14.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "./node_modules/oxfmt/configuration_schema.json", | ||
| "printWidth": 80, | ||
| "sortPackageJson": false, | ||
| "sortImports": { | ||
| "newlinesBetween": false, | ||
| "partitionByNewline": true | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,24 @@ | ||
| // A launch configuration that compiles the extension and then opens it inside a new window | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Run Extension", | ||
| "type": "extensionHost", | ||
| "request": "launch", | ||
| "args": [ | ||
| "--extensionDevelopmentPath=${workspaceFolder}" | ||
| ], | ||
| "outFiles": [ | ||
| "${workspaceFolder}/out/**/*.js" | ||
| ], | ||
| "preLaunchTask": "${defaultBuildTask}" | ||
| }, | ||
| { | ||
| "name": "Extension Tests", | ||
| "type": "extensionHost", | ||
| "request": "launch", | ||
| "args": [ | ||
| "--extensionDevelopmentPath=${workspaceFolder}", | ||
| "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" | ||
| ], | ||
| "outFiles": [ | ||
| "${workspaceFolder}/out/test/**/*.js" | ||
| ], | ||
| "preLaunchTask": "${defaultBuildTask}" | ||
| } | ||
| ] | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Run Extension", | ||
| "type": "extensionHost", | ||
| "request": "launch", | ||
| "args": ["--extensionDevelopmentPath=${workspaceFolder}"], | ||
| "outFiles": ["${workspaceFolder}/out/**/*.js"], | ||
| "preLaunchTask": "${defaultBuildTask}" | ||
| }, | ||
| { | ||
| "name": "Extension Tests", | ||
| "type": "extensionHost", | ||
| "request": "launch", | ||
| "args": [ | ||
| "--extensionDevelopmentPath=${workspaceFolder}", | ||
| "--extensionTestsPath=${workspaceFolder}/out/test/runAllTests" | ||
| ], | ||
| "outFiles": ["${workspaceFolder}/out/test/**/*.js"], | ||
| "preLaunchTask": "${defaultBuildTask}" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,4 @@ | ||
| // Place your settings in this file to overwrite default and user settings. | ||
| { | ||
| "files.exclude": { | ||
| "out": false // set this to true to hide the "out" folder with the compiled JS files | ||
| }, | ||
| "search.exclude": { | ||
| "out": true // set this to false to include "out" folder in search results | ||
| }, | ||
| // Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
| "typescript.tsc.autoDetect": "off", | ||
| "cSpell.words": [ | ||
| "eqeqeq" | ||
| ] | ||
| } | ||
| "editor.defaultFormatter": "oxc.oxc-vscode", | ||
| "oxc.configPath": "./oxlint.config.mts" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,18 @@ | ||
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
| // for the documentation about the tasks.json format | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "type": "npm", | ||
| "script": "watch", | ||
| "problemMatcher": "$tsc-watch", | ||
| "isBackground": true, | ||
| "presentation": { | ||
| "reveal": "never" | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| } | ||
| ] | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "type": "npm", | ||
| "script": "watch", | ||
| "problemMatcher": "$tsc-watch", | ||
| "isBackground": true, | ||
| "presentation": { | ||
| "reveal": "never" | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| } | ||
| ] | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step hard-fails the job when the version tag is already present, but this workflow now runs automatically after every successful
Testrun onmain. Any normal push that does not bumppackage.jsonwill therefore makeDeployfail even though there is nothing to publish, which leaves the release pipeline red between version bumps and makes reruns brittle. Treating an existing tag as a no-op (or conditionally skipping publish steps) avoids false failures.Useful? React with 👍 / 👎.