Add experimental IML formatter #334
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
name: ImandraX VSCode Extension CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: "Setup node" | |
uses: actions/setup-node@v4 | |
- name: "Install vsce" | |
run: npm install -g @vscode/vsce | |
- name: "Install esbuild" | |
run: npm install esbuild | |
- name: "Build extension" | |
run: npm install; vsce package | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts.zip | |
path: imandrax-*.vsix | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: install node | |
uses: actions/setup-node@v4 | |
- name: install deps | |
run: npm i | |
- name: install imandrax | |
run: | | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/imandra-ai/imandrax-api/refs/heads/main/scripts/install.sh)" -- -y | |
mkdir -p ~/.config/imandrax | |
touch ~/.config/imandrax/api_key | |
printf '%s' ${{ secrets.IU_API_KEY }} > ~/.config/imandrax/api_key | |
- name: test | |
run: xvfb-run -a npm run test-clean | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: [build, test] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: "Extract version number" | |
run: | | |
grep version package.json | cut -d ':' -f 2 | sed 's/[", ]//g' > version.txt | |
echo "VERSION="`cat version.txt` >> $GITHUB_ENV | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "imandrax-*.vsix" | |
name: "ImandraX VSIX ${{ env.VERSION }}" | |
body: "The latest release of the ImandraX VSCode extension" | |
tag: ver-${{ env.VERSION }} | |
allowUpdates: false | |
removeArtifacts: true | |
makeLatest: true | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com | |
extensionFile: imandrax-${{ env.VERSION }}.vsix |