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
32 changes: 7 additions & 25 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,32 +68,15 @@ jobs:
path: ${{ steps.package.outputs.vsix }}
if-no-files-found: error

# Job-level `if` can't read secrets, and the package job runs dependency
# code, so a separate job reports which marketplace tokens are set.
tokens:
name: Check Marketplace Tokens
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
vsce: ${{ steps.check.outputs.vsce }}
ovsx: ${{ steps.check.outputs.ovsx }}
steps:
- name: Check which tokens are set
id: check
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
echo "vsce=$([ -n "$VSCE_PAT" ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
echo "ovsx=$([ -n "$OVSX_PAT" ] && echo true || echo false)" >> "$GITHUB_OUTPUT"

publish-vscode:
name: Publish to VS Marketplace
needs: [package, tokens]
if: needs.tokens.outputs.vsce == 'true'
needs: package
Comment thread
code-asher marked this conversation as resolved.
if: github.repository == 'coder/vscode-coder'
runs-on: ubuntu-24.04
timeout-minutes: 10
environment: publish
permissions:
id-token: write # Allows generating an OIDC token.
steps:
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
Expand All @@ -118,14 +101,13 @@ jobs:

- name: Publish to VS Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
VSIX: ${{ needs.package.outputs.vsix }}
run: vsce publish $PRE_RELEASE_FLAG --packagePath "$VSIX"
run: vsce publish $PRE_RELEASE_FLAG --packagePath "$VSIX" --oidc

publish-ovsx:
name: Publish to Open VSX
needs: [package, tokens]
if: needs.tokens.outputs.ovsx == 'true'
needs: package
if: github.repository == 'coder/vscode-coder'
runs-on: ubuntu-24.04
timeout-minutes: 10
environment: publish
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@
"@vscode/codicons": "catalog:",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.1.0",
"@vscode/vsce": "^4.0.0",
"@vscode/vsce": "^4.1.0",
"babel-plugin-react-compiler": "catalog:",
"bufferutil": "^4.1.0",
"coder": "link:vendor/coder",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading