Merge pull request #142 from dotnetCarpenter/fix-CI #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Cache yarn cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install and build | |
run: | | |
yarn --frozen-lockfile | |
yarn compile | |
env: | |
CI: true | |
- name: Publish with vsce | |
run: | | |
npm i -g vsce | |
# Try to publish and ignore any errors (that version was already published) | |
vsce publish -p $VSCE_TOKEN || true | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} |