security: remove workflow_dispatch from publish workflow (#3583) #94
Workflow file for this run
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 Extension | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build.yaml | |
| package: | |
| needs: | |
| - build | |
| uses: ./.github/workflows/package.yaml | |
| publish-vscode-marketplace: | |
| needs: | |
| - package | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - darwin-amd64 | |
| - darwin-arm64 | |
| - linux-amd64 | |
| - linux-arm64 | |
| - windows-amd64 | |
| - windows-arm64 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: dist | |
| path: dist | |
| - id: get-extension-path | |
| run: echo "extension_path=dist/$(just name)-$(just version)-${{ matrix.target }}.vsix" >> "$GITHUB_OUTPUT" | |
| - name: Publish to Visual Studio Marketplace | |
| uses: HaaLeo/publish-vscode-extension@v2 | |
| with: | |
| registryUrl: https://marketplace.visualstudio.com | |
| pat: ${{ secrets.VSCE_PAT }} | |
| extensionFile: ${{ steps.get-extension-path.outputs.extension_path }} | |
| skipDuplicate: true | |
| publish-open-vsx: | |
| needs: | |
| - package | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - darwin-amd64 | |
| - darwin-arm64 | |
| - linux-amd64 | |
| - linux-arm64 | |
| - windows-amd64 | |
| - windows-arm64 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: dist | |
| path: dist | |
| - id: get-extension-path | |
| run: echo "extension_path=dist/$(just name)-$(just version)-${{ matrix.target }}.vsix" >> "$GITHUB_OUTPUT" | |
| - name: Publish to Open VSX Registry | |
| uses: HaaLeo/publish-vscode-extension@v2 | |
| with: | |
| pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
| extensionFile: ${{ steps.get-extension-path.outputs.extension_path }} | |
| skipDuplicate: true |