Skip to content

Commit

Permalink
Add publish-vsce job
Browse files Browse the repository at this point in the history
- Add publish-vsce job to publish the extension to the Visual Studio Code Extension Marketplace.
- Remove the `@remarkjs` scope since VSCE doesn't like it.
  • Loading branch information
asbjornu committed Mar 17, 2021
1 parent 51642f7 commit 75654d4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,33 @@ jobs:
- uses: actions/download-artifact@v2
with:
name: vscode-remark
- uses: actions/setup-node@v2
with:
registry-url: https://npm.pkg.github.com/remarkjs/
scope: '@remarkjs'
- run: npm install
- name: npm config
run: npm config set registry https://npm.pkg.github.com/remarkjs:_authToken=${{ secrets.GITHUB_TOKEN }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-vsce:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
- uses: actions/download-artifact@v2
with:
name: vscode-remark
- name: install vsce
run: npm install -g vsce
- run: vsce package
- uses: actions/upload-artifact@v2
with:
name: vscode-remark.vsix
path: '*.vsix'
- name: vsce publish
run: vsce publish --pat ${{ secrets.VSCE_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@remarkjs/vscode-remark",
"name": "vscode-remark",
"displayName": "Remark ",
"description": "Beautify markdown code with Remark",
"version": "1.2.1",
Expand Down

0 comments on commit 75654d4

Please sign in to comment.