diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 008a9bf..b386fe6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} 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",