pascal-vscode 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/better-showers-knock.md +5 -0
  3. package/.changeset/config.json +12 -0
  4. package/.changeset/pre.json +10 -0
  5. package/.editorconfig +15 -0
  6. package/.github/FUNDING.yml +6 -0
  7. package/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
  8. package/.github/PULL_REQUEST_TEMPLATE.md +5 -0
  9. package/.github/actions/setup-git-commiter/action.yml +49 -0
  10. package/.github/actions/setup-pnpm/action.yml +42 -0
  11. package/.github/issue_labeler.yml +2 -0
  12. package/.github/labeler.yml +9 -0
  13. package/.github/renovate.json5 +48 -0
  14. package/.github/workflows/check_merge.yml +109 -0
  15. package/.github/workflows/cleanup_cache.yml +46 -0
  16. package/.github/workflows/diff_dependencies.yml +26 -0
  17. package/.github/workflows/format.yml +45 -0
  18. package/.github/workflows/label_issue.yml +18 -0
  19. package/.github/workflows/label_pr.yml +16 -0
  20. package/.github/workflows/lint_pr_title.yml +49 -0
  21. package/.github/workflows/release.yml +67 -0
  22. package/.prettierignore +25 -0
  23. package/.vscode/extensions.json +10 -0
  24. package/.vscode/launch.json +25 -0
  25. package/.vscode/settings.json +13 -0
  26. package/.vscode/tasks.json +17 -0
  27. package/.vscodeignore +32 -0
  28. package/CHANGELOG.md +7 -0
  29. package/CODE_OF_CONDUCT.md +65 -0
  30. package/CONTRIBUTING.md +86 -0
  31. package/LICENSE +21 -0
  32. package/README.md +51 -0
  33. package/assets/icon.png +0 -0
  34. package/assets/icon.svg +1 -0
  35. package/assets/preview.png +0 -0
  36. package/biome.jsonc +113 -0
  37. package/dist/browser.js +1 -0
  38. package/dist/extension.js +1 -0
  39. package/eslint.config.js +91 -0
  40. package/package.json +78 -0
  41. package/pnpm-workspace.yaml +4 -0
  42. package/prettier.config.mjs +17 -0
  43. package/scripts/build.js +107 -0
  44. package/src/browser.ts +14 -0
  45. package/src/extension.ts +4 -0
  46. package/themes/default.json +358 -0
  47. package/tsconfig.json +24 -0
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets).
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
@@ -0,0 +1,5 @@
1
+ ---
2
+ 'pascal-vscode': patch
3
+ ---
4
+
5
+ Fix build process in release workflow to ensure the extension is built before publishing.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
3
+ "changelog": ["@changesets/changelog-github", { "repo": "hadez8877/pascal" }],
4
+ "commit": false,
5
+ "linked": [],
6
+ "access": "public",
7
+ "baseBranch": "origin/main",
8
+ "updateInternalDependencies": "patch",
9
+ "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
10
+ "onlyUpdatePeerDependentsWhenOutOfRange": true
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "mode": "pre",
3
+ "tag": "alpha",
4
+ "initialVersions": {
5
+ "pascal-vscode": "0.0.1"
6
+ },
7
+ "changesets": [
8
+ "better-showers-knock"
9
+ ]
10
+ }
package/.editorconfig ADDED
@@ -0,0 +1,15 @@
1
+ # https://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ [*]
7
+ charset = utf-8
8
+ end_of_line = lf
9
+ indent_size = 2
10
+ indent_style = tab
11
+ insert_final_newline = true
12
+ trim_trailing_whitespace = false
13
+
14
+ [{.*,*.md,*.json,*.toml,*.yml,*.json5}]
15
+ indent_style = space
@@ -0,0 +1,6 @@
1
+ # These are supported funding model platforms
2
+
3
+ ko_fi: hadez8877
4
+ github: hadez8877
5
+ open_collective: hadez
6
+ thanks_dev: u/gh/hadez8877
@@ -0,0 +1,47 @@
1
+ name: "Bug Report"
2
+ description: Report an issue with the extension or possible visual bug.
3
+
4
+ labels: ['kind: bug']
5
+
6
+ body:
7
+ - type: dropdown
8
+ id: extension-support
9
+ attributes:
10
+ label: Which extension support is this bug report for?
11
+ options:
12
+ - vscode
13
+ validations:
14
+ required: true
15
+
16
+ - type: input
17
+ id: location
18
+ attributes:
19
+ label: Issue Location
20
+ description: Please indicate where in the window the issue occurs.
21
+ placeholder: Scrollbar, editor, menubar, semantic highlighting, etc...
22
+ validations:
23
+ required: false
24
+
25
+ - type: textarea
26
+ id: description
27
+ attributes:
28
+ label: Issue Description
29
+ description: Please describe the issue.
30
+ placeholder: Description of your observation...
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: expected
36
+ attributes:
37
+ label: Expected Behavior
38
+ description: Please describe what the expected behavior should be.
39
+ placeholder: When viewing this part of the editor, I would expect...
40
+ validations:
41
+ required: true
42
+
43
+ - type: textarea
44
+ id: additional
45
+ attributes:
46
+ label: Additional Information
47
+ description: Please provide any additional information you can provide (images, logs, etc.). Please wrap logs in backticks for readability.
@@ -0,0 +1,5 @@
1
+ ## What's Changed?
2
+ <!-- If you're fixing a UI issue, make sure you take two screenshots. One that shows the actual bug and another that shows how you fixed it. -->
3
+
4
+ ## Fixes Issue
5
+ <!-- Add the issue number here, e.g., Fixes #123 -->
@@ -0,0 +1,49 @@
1
+ name: 'Setup Git Committer'
2
+ description: 'Create app token and configure git user'
3
+
4
+ inputs:
5
+ pascal-client-id:
6
+ description: 'Pascal GitHub Client ID'
7
+ required: true
8
+ pascal-app-secret:
9
+ description: 'Pascal GitHub App private key'
10
+ required: true
11
+
12
+ outputs:
13
+ token:
14
+ description: 'GitHub App token'
15
+ value: ${{ steps.apptoken.outputs.token }}
16
+ app-slug:
17
+ description: 'GitHub App slug'
18
+ value: ${{ steps.apptoken.outputs.app-slug }}
19
+
20
+ runs:
21
+ using: 'composite'
22
+
23
+ steps:
24
+ - name: Create app token
25
+ id: apptoken
26
+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
27
+ with:
28
+ client-id: ${{ inputs.pascal-client-id }}
29
+ private-key: ${{ inputs.pascal-app-secret }}
30
+ owner: ${{ github.repository_owner }}
31
+ permission-contents: write
32
+ permission-pull-requests: write
33
+
34
+ - name: Configure git user
35
+ run: |
36
+ slug='${{ steps.apptoken.outputs.app-slug }}'
37
+ git config --global user.name '${slug}[bot]'
38
+ git config --global user.email '${slug}[bot]@users.noreply.github.com'
39
+ shell: bash
40
+
41
+ - name: Clear checkout auth
42
+ run: |
43
+ git config --local --unset-all http.https://github.com/.extraheader || true
44
+ shell: bash
45
+
46
+ - name: Configure git remote
47
+ run: |
48
+ git remote set-url origin https://x-access-token:${{ steps.apptoken.outputs.token }}@github.com/${{ github.repository }}
49
+ shell: bash
@@ -0,0 +1,42 @@
1
+ name: 'pnpm install'
2
+ description: 'Run pnpm install with cache enabled'
3
+ runs:
4
+ using: 'composite'
5
+ steps:
6
+ - name: Set up swap space
7
+ if: runner.os == 'Linux'
8
+ uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0
9
+ with:
10
+ swap-size-gb: 10
11
+
12
+ - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
13
+ name: Install pnpm
14
+ with:
15
+ run_install: false
16
+
17
+ - name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
18
+ id: pnpm-config
19
+ shell: bash
20
+ run: |
21
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
22
+
23
+ - name: Cache rotation keys
24
+ id: cache-rotation
25
+ shell: bash
26
+ run: |
27
+ echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
28
+
29
+ - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
30
+ name: Setup pnpm cache
31
+ with:
32
+ path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
33
+ key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
34
+ restore-keys: |
35
+ ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-
36
+
37
+ - name: Install dependencies
38
+ shell: bash
39
+ run: |
40
+ pnpm install --frozen-lockfile --prefer-offline --loglevel error
41
+ env:
42
+ HUSKY: '0'
@@ -0,0 +1,2 @@
1
+ 'extension: vscode':
2
+ - "### Which extension support is this bug report for\\?\\n\\nvscode\\n"
@@ -0,0 +1,9 @@
1
+ 'actions':
2
+ - changed-files:
3
+ - any-glob-to-any-file:
4
+ - .github/workflows/**
5
+ # For now, all other changes are considered vscode extension changes, in the future we can split to workspaces
6
+ 'extension: vscode':
7
+ - changed-files:
8
+ - any-glob-to-any-file:
9
+ - '**/*'
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended",
5
+ "schedule:weekly",
6
+ ":disablePeerDependencies",
7
+ "regexManagers:biomeVersions",
8
+ "helpers:pinGitHubActionDigestsToSemver"
9
+ ],
10
+ "labels": ["dependencies"],
11
+ "rangeStrategy": "bump",
12
+ "postUpdateOptions": ["pnpmDedupe"],
13
+ "toolSettings": {
14
+ "nodeMaxMemory": 3072
15
+ },
16
+ "lockFileMaintenance": {
17
+ "enabled": true
18
+ },
19
+ "ignorePaths": ["**/node_modules/**"],
20
+ "packageRules": [
21
+ //#region Infra groups
22
+ {
23
+ "groupName": "lockfile maintenance",
24
+ "matchUpdateTypes": ["lockFileMaintenance"]
25
+ },
26
+ {
27
+ "groupName": "github-actions",
28
+ "matchManagers": ["github-actions"]
29
+ },
30
+ {
31
+ "matchManagers": ["npm"],
32
+ "matchDepTypes": ["engines"],
33
+ "enabled": false
34
+ },
35
+ //#endregion
36
+ ],
37
+ "ignoreDeps": [
38
+ // manually bumping deps
39
+ "@biomejs/biome",
40
+ "@types/node",
41
+ "@types/vscode",
42
+
43
+ // manually bumping workflow actions
44
+ "actions/labeler",
45
+ "github/issue-labeler"
46
+ ],
47
+ "minimumReleaseAge": "3 days"
48
+ }
@@ -0,0 +1,109 @@
1
+ name: Check mergeability
2
+
3
+ on: pull_request_target
4
+
5
+ permissions:
6
+ pull-requests: write
7
+ checks: write
8
+ statuses: write
9
+
10
+ jobs:
11
+ check:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Check if there is already a block on this PR
15
+ id: blocked
16
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
17
+ env:
18
+ issue_number: ${{ github.event.number }}
19
+ with:
20
+ script: |
21
+ const { data: reviews } = await github.rest.pulls.listReviews({
22
+ owner: context.repo.owner,
23
+ repo: context.repo.repo,
24
+ pull_number: process.env.issue_number,
25
+ });
26
+
27
+ for (const review of reviews) {
28
+ if (review.user.login === 'github-actions[bot]' && review.state === 'CHANGES_REQUESTED') {
29
+ return 'true'
30
+ }
31
+ }
32
+ return 'false'
33
+ result-encoding: string
34
+
35
+ - name: Get changed files in the .changeset folder
36
+ id: changed-files
37
+ uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
38
+ if: steps.blocked.outputs.result != 'true'
39
+ with:
40
+ files: |
41
+ .changeset/**/*.md
42
+
43
+ - name: Check if any changesets contain minor or major changes
44
+ id: check
45
+ if: steps.changed-files.outputs.any_changed == 'true'
46
+ env:
47
+ ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
48
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
49
+ with:
50
+ script: |
51
+ core.setOutput('found', 'false');
52
+
53
+ const regex = /["']pascal["']: (minor|major)/;
54
+ const changedFiles = process.env.ALL_CHANGED_FILES.split(/\s+/).filter(Boolean);
55
+ const { owner, name: repo } = context.payload.pull_request.head.repo;
56
+ const ref = context.payload.pull_request.head.sha;
57
+
58
+ for (const file of changedFiles) {
59
+ const { data } = await github.rest.repos.getContent({
60
+ owner: owner.login,
61
+ repo,
62
+ path: file,
63
+ ref,
64
+ });
65
+
66
+ if (Array.isArray(data) || !('content' in data)) {
67
+ continue;
68
+ }
69
+
70
+ const contents = Buffer.from(data.content, 'base64').toString('utf8');
71
+ const match = contents.match(regex);
72
+
73
+ if (match) {
74
+ const version = match[1];
75
+ core.setOutput('version', version);
76
+ core.setOutput('found', 'true');
77
+ console.log(`${file} has a ${version} release tag`);
78
+ break;
79
+ }
80
+ }
81
+
82
+ - name: Add label
83
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
84
+ if: steps.check.outputs.found == 'true'
85
+ env:
86
+ issue_number: ${{ github.event.number }}
87
+ with:
88
+ script: |
89
+ github.rest.issues.addLabels({
90
+ issue_number: process.env.issue_number,
91
+ owner: context.repo.owner,
92
+ repo: context.repo.repo,
93
+ labels: ['semver: ${{ steps.check.outputs.version }}']
94
+ });
95
+
96
+ - name: Change PR Status
97
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
98
+ if: steps.check.outputs.found == 'true'
99
+ env:
100
+ issue_number: ${{ github.event.number }}
101
+ with:
102
+ script: |
103
+ github.rest.pulls.createReview({
104
+ owner: context.repo.owner,
105
+ repo: context.repo.repo,
106
+ pull_number: process.env.issue_number,
107
+ event: 'REQUEST_CHANGES',
108
+ body: 'This PR is blocked because it contains a `${{ steps.check.outputs.version }}` changeset. A reviewer will merge this at the next release if approved.'
109
+ });
@@ -0,0 +1,46 @@
1
+ name: Cleanup cache
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 11 * * *'
6
+
7
+ pull_request:
8
+ types:
9
+ - closed
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ cleanup:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19
+
20
+ - name: Cleanup caches older than 5 days
21
+ if: github.event_name == 'schedule'
22
+ uses: MyAlbum/purge-cache@881eb5957687193fa612bf74c0042adc78ea5e54 # v2.2.0
23
+ with:
24
+ max-age: 432000
25
+
26
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
27
+ - name: Cleanup caches
28
+ run: |
29
+ gh extension install actions/gh-actions-cache
30
+
31
+ REPO=${{ github.repository }}
32
+ BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
33
+
34
+ echo "Fetching list of cache key"
35
+ cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
36
+
37
+ ## Setting this to not fail the workflow while deleting cache keys.
38
+ set +e
39
+ echo "Deleting caches..."
40
+ for cacheKey in $cacheKeysForPR
41
+ do
42
+ gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
43
+ done
44
+ echo "Done"
45
+ env:
46
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,26 @@
1
+ name: Diff Dependencies
2
+
3
+ on:
4
+ pull_request_target:
5
+ paths-ignore:
6
+ - ".vscode/**"
7
+ - "**/*.md"
8
+ - ".github/ISSUE_TEMPLATE/**"
9
+
10
+ jobs:
11
+ diff_dependencies:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ pull-requests: write
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
19
+ with:
20
+ fetch-depth: 0 # allows the diff action to access git history
21
+
22
+ - name: Create Diff
23
+ uses: e18e/action-dependency-diff@8e9b8c1957ab066d36235a43f4c1ff1522e1bdbc # v1.6.1
24
+ with:
25
+ # We’re using this package primarily to track size changes, not as worried about duplicates
26
+ duplicate-threshold: 100
@@ -0,0 +1,45 @@
1
+ name: Format
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ format:
11
+ if: ${{ github.repository_owner == 'hadez8877' }}
12
+ runs-on: ubuntu-latest
13
+ env:
14
+ NODE_OPTIONS: "--max_old_space_size=4096"
15
+ steps:
16
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
17
+ with:
18
+ ref: ${{ github.head_ref }}
19
+
20
+ - name: Setup git commiter
21
+ id: commiter
22
+ uses: ./.github/actions/setup-git-commiter
23
+ with:
24
+ pascal-client-id: ${{ vars.PASCAL_CLIENT_ID }}
25
+ pascal-app-secret: ${{ secrets.PASCAL_APP_SECRET }}
26
+
27
+ - name: setup PNPM
28
+ uses: ./.github/actions/setup-pnpm
29
+
30
+ - name: Setup Node
31
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
32
+ with:
33
+ node-version: 24.16.0
34
+
35
+ - name: Format code
36
+ run: pnpm run format
37
+
38
+ - name: Commit changes
39
+ uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
40
+ with:
41
+ commit_message: "[ci] format"
42
+ branch: ${{ github.head_ref }}
43
+ commit_user_name: ${{ steps.commiter.outputs.app-slug }}[bot]
44
+ commit_user_email: ${{ steps.commiter.outputs.app-slug }}[bot]@users.noreply.github.com
45
+ commit_author: ${{ github.event.commits[0].author.name }} <${{ github.actor }}@users.noreply.github.com>
@@ -0,0 +1,18 @@
1
+ name: Label Issue
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+
8
+ jobs:
9
+ triage:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
14
+ with:
15
+ repo-token: '${{ secrets.GITHUB_TOKEN }}'
16
+ configuration-path: .github/issue_labeler.yml
17
+ not-before: 2023-01-13T10:25:03.847Z
18
+ enable-versioned-regex: 0
@@ -0,0 +1,16 @@
1
+ # Automatically labels PRs based on the configuration file
2
+ # you are probably looking for 👉 `.github/labeler.yml`
3
+ name: Label PRs
4
+
5
+ on:
6
+ - pull_request_target
7
+
8
+ jobs:
9
+ triage:
10
+ runs-on: ubuntu-latest
11
+ if: ${{ github.repository_owner == 'hadez8877' }}
12
+ steps:
13
+ - uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
14
+ with:
15
+ repo-token: '${{ secrets.GITHUB_TOKEN }}'
16
+ sync-labels: true
@@ -0,0 +1,49 @@
1
+ name: Lint pull request title
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+ - reopened
10
+
11
+ permissions: {}
12
+
13
+ jobs:
14
+ main:
15
+ name: Validate PR title
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 5
18
+ permissions:
19
+ contents: read # Checkout only
20
+ steps:
21
+ - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
22
+ env:
23
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
+ with:
25
+ # Configure which types are allowed (newline-delimited).
26
+ types: |
27
+ chore
28
+ build
29
+ ci
30
+ docs
31
+ feat
32
+ fix
33
+ perf
34
+ refactor
35
+ revert
36
+ style
37
+ test
38
+ types
39
+ # Scopes are not allowed.
40
+ scopes: ''
41
+ # Configure additional validation for the subject based on a regex.
42
+ # Ensures that the subject starts with a lowercase character.
43
+ subjectPattern: ^[a-z].*$
44
+ # If `subjectPattern` is configured, you can use this property to override
45
+ # the default error message that is shown when the pattern doesn't match.
46
+ # The variables `subject` and `title` can be used within the message.
47
+ subjectPatternError: |
48
+ The subject "{subject}" found in the pull request title "{title}" doesn't match the configured pattern.
49
+ Please ensure that the subject starts with a lowercase character.
@@ -0,0 +1,67 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ name: Changelog PR or Release
11
+ if: ${{ github.repository_owner == 'hadez8877' }}
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17
+ with:
18
+ # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
19
+ fetch-depth: 0
20
+
21
+ - name: setup PNPM
22
+ uses: ./.github/actions/setup-pnpm
23
+
24
+ - name: Setup Node
25
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
26
+ with:
27
+ node-version: 24.16.0
28
+
29
+ - name: Setup git commiter
30
+ id: commiter
31
+ uses: ./.github/actions/setup-git-commiter
32
+ with:
33
+ pascal-client-id: ${{ vars.PASCAL_CLIENT_ID }}
34
+ pascal-app-secret: ${{ secrets.PASCAL_APP_SECRET }}
35
+
36
+ - name: Build extension
37
+ run: pnpm run build
38
+
39
+ - name: Create Release Pull Request or Publish
40
+ id: changesets
41
+ uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
42
+ with:
43
+ # Note: pnpm install after versioning is necessary to refresh lockfile
44
+ version: pnpm run version
45
+ publish: pnpm exec changeset publish
46
+ commit: '[ci] release'
47
+ title: '[ci] release'
48
+ env:
49
+ # Needs access to push to main
50
+ GITHUB_TOKEN: ${{ steps.commiter.outputs.token }}
51
+ # Use OIDC for npm authentication instead of NPM_TOKEN
52
+ NPM_TOKEN: '' # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
53
+
54
+ - name: Check if pascal-vscode was published
55
+ id: vscode-published
56
+ if: steps.changesets.outputs.published == 'true'
57
+ run: |
58
+ if echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -e '.[] | select(.name == "pascal-vscode")' > /dev/null; then
59
+ echo "published=true" >> $GITHUB_OUTPUT
60
+ else
61
+ echo "published=false" >> $GITHUB_OUTPUT
62
+ fi
63
+
64
+ - name: Publish to OpenVSX
65
+ if: steps.vscode-published.outputs.published == 'true'
66
+ run: |
67
+ pnpm exec ovsx publish -p ${{ secrets.OVSX_TOKEN }}