Skip to content

Commit cace4ac

Browse files
committed
Update internal docs for publishing
And remove unused file.
1 parent 696c16b commit cace4ac

3 files changed

Lines changed: 25 additions & 48 deletions

File tree

.github/workflows/publish-open-vsx.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
vscode-publish:
128128
name: Publish to VS Code Marketplace
129129
needs: build
130-
environment: publish
130+
environment: publish-vscode-marketplace
131131
runs-on: ubuntu-latest
132132
env:
133133
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
@@ -139,12 +139,15 @@ jobs:
139139

140140
- name: Publish to Registry
141141
run: |
142-
npx vsce publish -p $VSCE_TOKEN --packagePath *.vsix
142+
npx vsce publish -p $VSCE_TOKEN --packagePath *.vsix || \
143+
echo "Failed to publish to VS Code Marketplace. \
144+
If this was an authentication problem, please make sure the \
145+
auth token hasn't expired."
143146
144147
open-vsx-publish:
145148
name: Publish to Open VSX Registry
146149
needs: build
147-
environment: publish
150+
environment: publish-open-vsx
148151
runs-on: ubuntu-latest
149152
env:
150153
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,31 @@ Alternatively, you can run the tests inside of vscode. There are several vscode
115115
1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,
116116
or look at the source if there's any doubt the right code is being shipped.
117117
1. Go to the actions tab of the vscode-codeql repository and select the [Release workflow](https://github.com/github/vscode-codeql/actions?query=workflow%3ARelease).
118+
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
118119
1. Approve the deployments of the correct Release workflow. This will automatically publish to Open VSX and VS Code Marketplace.
119120
1. Go to the draft GitHub release in [the releases tab of the repository](https://github.com/github/vscode-codeql/releases), click 'Edit', add some summary description, and publish it.
120121
1. Confirm the new release is marked as the latest release at <https://github.com/github/vscode-codeql/releases>.
121122
1. If documentation changes need to be published, notify documentation team that release has been made.
122123
1. Review and merge the version bump PR that is automatically created by Actions.
123124

125+
## Secrets and authentication for publishing
126+
127+
Repository administrators, will need to manage the authentication keys for publishing to the VS Code marketplace and Open VSX. Each requires an authentication token. The VS Code marketplace token expires yearly.
128+
129+
To regenerate the Open VSX token:
130+
131+
1. Log in to the [user settings page on Open VSX](https://open-vsx.org/user-settings/namespaces).
132+
1. Make sure you are a member of the GitHub namespace.
133+
1. Go to the [Access Tokens](https://open-vsx.org/user-settings/tokens) page and generate a new token.
134+
1. Update the secret in the `publish-open-vsx` environment in the project settings.
135+
136+
To regenerate the VSCode Marketplace token:
137+
138+
1. Follow the instructions on [getting a PAT for Azure DevOps](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token).
139+
1. Update the secret in the `publish-vscode-marketplace` environment in the project settings.
140+
141+
Not that Azure DevOps PATs expire yearly and must be regenerated.
142+
124143
## Resources
125144

126145
* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

0 commit comments

Comments
 (0)