Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Update GitHub Action to publish extension on tag
Browse files Browse the repository at this point in the history
fixes #86

Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed Sep 2, 2022
1 parent 673f5d3 commit 548338e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
13 changes: 4 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Publishing a release

See [Publishing Extensions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension).

```console
# Change version in package.json first!
$ vsce package
$ vsce publish
```

Then cut a new GitHub release.
* Ensure version in package.json has not been published yet. If already published, increase it (do nto forget package-lock.json). This kind of command be used: `npm version --no-git-tag-version patch`
* Create a tag and potentially a GitHub release
* Check GitHub Action `Publish Extension on tag` workflow has been triggered and is successful
* It is a good habit to upgrade the version after a successful publish, for instance with this kind of command: `npm version --no-git-tag-version patch`
11 changes: 6 additions & 5 deletions .github/workflows/publishTags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ on:
tags:
- "*"

name: Deploy Extension
name: Publish Extension on tag
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16'
cache: 'npm'
- run: npm ci
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v0
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v0
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com

0 comments on commit 548338e

Please sign in to comment.