Align record columns at three scopes with grid-array exclusions #117
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: Build VSIX | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| # Default least-privilege token scope; jobs that need more elevate explicitly. | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout (with submodule) | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Setup Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: '3.12' | |
| cache: pip | |
| cache-dependency-path: scripts/requirements.txt | |
| - name: Install dependencies | |
| run: pip install -r scripts/requirements.txt | |
| - name: Run Python tests | |
| run: pytest scripts/ | |
| - name: Build keyword index | |
| run: | | |
| python scripts/build_keyword_index.py \ | |
| --manual-dir opm-reference-manual \ | |
| --opm-common-dir opm-common/opm/input/eclipse/share/keywords \ | |
| --output keyword_index.json \ | |
| --compact vscode-extension/data/keyword_index_compact.json | |
| - name: Upload keyword index | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: keyword-index | |
| path: vscode-extension/data/keyword_index_compact.json | |
| if-no-files-found: error | |
| package: | |
| needs: build-index | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| working-directory: vscode-extension | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: '24' | |
| cache: npm | |
| cache-dependency-path: vscode-extension/package-lock.json | |
| - name: Download freshly built keyword index | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: keyword-index | |
| path: vscode-extension/data | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| - name: Package VSIX | |
| run: npx --yes @vscode/vsce@3.9.1 package | |
| - name: Upload VSIX artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: opm-flow-editor-support-vsix | |
| path: vscode-extension/opm-flow-editor-support-*.vsix | |
| if-no-files-found: error | |
| - name: Attach VSIX to release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3 | |
| with: | |
| files: vscode-extension/opm-flow-editor-support-*.vsix | |
| publish-marketplace: | |
| needs: package | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: '24' | |
| - name: Download VSIX | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: opm-flow-editor-support-vsix | |
| path: . | |
| - name: Publish to VS Code Marketplace | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: npx --yes @vscode/vsce@3.9.1 publish --packagePath opm-flow-editor-support-*.vsix --pat "$VSCE_PAT" | |
| # Disabled until Open VSX account + OVSX_PAT secret are set up. | |
| # To re-enable: change `if: false` back to `if: startsWith(github.ref, 'refs/tags/v')`. | |
| publish-ovsx: | |
| needs: package | |
| if: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: '24' | |
| - name: Download VSIX | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: opm-flow-editor-support-vsix | |
| path: . | |
| - name: Publish to Open VSX | |
| env: | |
| OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
| run: npx --yes ovsx@0.10.12 publish opm-flow-editor-support-*.vsix -p "$OVSX_PAT" |