From df913db190efcbe8bd1bd2a2d38f50f992588a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Wed, 17 Mar 2021 02:20:24 +0100 Subject: [PATCH] Add publish-vsce job - 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. --- .github/workflows/build.yml | 29 ++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 008a9bf..4489720 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,11 +65,38 @@ jobs: - uses: actions/download-artifact@v2 with: name: vscode-remark + - run: npm install - uses: actions/setup-node@v2 with: registry-url: https://npm.pkg.github.com/remarkjs/ scope: '@remarkjs' - - run: npm install + - run: cat .npmrc + - 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 }} diff --git a/package.json b/package.json index cfbd5a6..c75db4f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@remarkjs/vscode-remark", + "name": "vscode-remark", "displayName": "Remark ", "description": "Beautify markdown code with Remark", "version": "1.2.1",