Publish VS Code Extension #16
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: Publish VS Code Extension | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.11.1 | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: vscode-extension | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| working-directory: vscode-extension | |
| - name: Set up Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Build JAR with Maven | |
| run: mvn clean package | |
| working-directory: fhir-mapbuilder-validation | |
| - name: Ensure target directory exists in extension | |
| run: mkdir -p vscode-extension/target | |
| - name: Move JAR to VS Code extension | |
| run: mv fhir-mapbuilder-validation/target/fhir-mapbuilder-validation.jar vscode-extension/target | |
| - name: Install vsce | |
| run: npm install -g vsce | |
| - name: Publish to Marketplace | |
| shell: bash | |
| env: | |
| P_A_T: ${{ secrets.P_A_T }} | |
| run: vsce publish -p "$P_A_T" --baseImagesUrl=https://raw.githubusercontent.com/aphp/fhir-mapbuilder/refs/heads/main/vscode-extension | |
| working-directory: vscode-extension |