Update internal docs for publishing

And remove unused file.
This commit is contained in:
Andrew Eisenberg
2021-01-11 08:44:17 -08:00
parent 696c16b5b4
commit cace4acb1e
3 changed files with 25 additions and 48 deletions

View File

@@ -1,45 +0,0 @@
# Publish the extension to the open-vsx registry at https://open-vsx.org
name: Publish Open VSX
on:
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '10.18.1'
- name: Install dependencies
run: |
cd extensions/ql-vscode
npm install
shell: bash
- name: Build
run: |
cd extensions/ql-vscode
npm run build -- --release
shell: bash
- name: Prepare artifacts
id: prepare-artifacts
run: |
mkdir artifacts
cp dist/*.vsix artifacts
VSIX_PATH="$(ls artifacts/*.vsix)"
echo "::set-output name=vsix_path::$VSIX_PATH"
- name: Publish to Registry
env:
VSIX_PATH: ${{ steps.prepare-artifacts.outputs.vsix_path }}
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}
run: |
cd extensions/ql-vscode
npx ovsx publish $VSIX_PATH -p $OPEN_VSX_TOKEN

View File

@@ -127,7 +127,7 @@ jobs:
vscode-publish:
name: Publish to VS Code Marketplace
needs: build
environment: publish
environment: publish-vscode-marketplace
runs-on: ubuntu-latest
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
@@ -139,12 +139,15 @@ jobs:
- name: Publish to Registry
run: |
npx vsce publish -p $VSCE_TOKEN --packagePath *.vsix
npx vsce publish -p $VSCE_TOKEN --packagePath *.vsix || \
echo "Failed to publish to VS Code Marketplace. \
If this was an authentication problem, please make sure the \
auth token hasn't expired."
open-vsx-publish:
name: Publish to Open VSX Registry
needs: build
environment: publish
environment: publish-open-vsx
runs-on: ubuntu-latest
env:
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}

View File

@@ -115,12 +115,31 @@ Alternatively, you can run the tests inside of vscode. There are several vscode
1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,
or look at the source if there's any doubt the right code is being shipped.
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).
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
1. Approve the deployments of the correct Release workflow. This will automatically publish to Open VSX and VS Code Marketplace.
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.
1. Confirm the new release is marked as the latest release at <https://github.com/github/vscode-codeql/releases>.
1. If documentation changes need to be published, notify documentation team that release has been made.
1. Review and merge the version bump PR that is automatically created by Actions.
## Secrets and authentication for publishing
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.
To regenerate the Open VSX token:
1. Log in to the [user settings page on Open VSX](https://open-vsx.org/user-settings/namespaces).
1. Make sure you are a member of the GitHub namespace.
1. Go to the [Access Tokens](https://open-vsx.org/user-settings/tokens) page and generate a new token.
1. Update the secret in the `publish-open-vsx` environment in the project settings.
To regenerate the VSCode Marketplace token:
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).
1. Update the secret in the `publish-vscode-marketplace` environment in the project settings.
Not that Azure DevOps PATs expire yearly and must be regenerated.
## Resources
* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)