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
7 changes: 4 additions & 3 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ jobs:

strategy:
matrix:
node-version: [18.x]
# We test latest, the LTS version and an old one.
node-version: [26.x, 24.x, 18.x]

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
release:
types: [prereleased, released]

name: Deploy Extension
jobs:
publish-extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
## make sure this corresponds with the version in test.yml
node-version: latest

- name: Install deps
run: npm ci

- name: Build grammars
run: make grammars

- name: Run tests
run: make test

- name: Package Extension
id: packageExtension
run: |
npx vsce package --out language-haskell-${{ github.event.release.tag_name }}.vsix

## Make sure the artifact is added to the release.
- name: Upload extension vsix to workflow artifacts
uses: actions/upload-artifact@v7
with:
name: language-haskell-${{ github.event.release.tag_name }}.vsix
path: language-haskell-${{ github.event.release.tag_name }}.vsix

# Set pre-release flag if the job is a pre-release
- name: Set pre-release flag
id: flags
run: |
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
echo "flag=--pre-release" >> $GITHUB_OUTPUT
else
echo "flag=" >> $GITHUB_OUTPUT
fi

# Publish to VS Marketplace
- run: npx vsce publish ${{ steps.flags.outputs.flag }} --packagePath language-haskell-${{ github.event.release.tag_name }}.vsix
env:
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}

# Publish to Open VSX
- run: npx ovsx publish ${{ steps.flags.outputs.flag }} --packagePath language-haskell-${{ github.event.release.tag_name }}.vsix
env:
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}
21 changes: 11 additions & 10 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 @@ -255,8 +255,8 @@
"js-yaml": "^4.0.0",
"npm": "^11.13.0",
"ts-loader": "^9.4.2",
"typescript": "^4.9.4",
"typescript": "^6.0.3",
"webpack": "^5.106.2",
"webpack-cli": "^5.0.1"
}
}
}
24 changes: 11 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "esnext",
"outDir": "out",
"sourceMap": true,
"strict": true,
"lib": ["ESNext"],
"rootDir": "."
},
"exclude": [
"node_modules",
"out"
]
"compilerOptions": {
"module": "commonjs",
"target": "esnext",
"outDir": "out",
"sourceMap": true,
"strict": true,
"lib": ["ESNext"],
"rootDir": ".",
"skipDefaultLibCheck": true
},
"exclude": ["node_modules", "out"]
}