Skip to content

Version Packages (#3603) #932

Version Packages (#3603)

Version Packages (#3603) #932

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions: {}
jobs:
release:
permissions:
contents: write # for changesets/action to git push
environment: deploy
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
cache: yarn
- name: Cache node modules
uses: actions/cache@v3
id: cache-modules
with:
path: node_modules
key: node_modules-${{hashFiles('yarn.lock')}}
restore-keys: node_modules-
- run: yarn install --frozen-lockfile --immutable
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn ci:version
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
# only use GH token here, because GITHUB_TOKEN is no longer allowed to create PRs
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# for vscode marketplace, see https://github.com/microsoft/vscode-vsce/blob/194d59b975523696362ead891dc0f3ddd277b3bd/README.md#linux
VSCE_PAT: ${{ secrets.VSCE_PAT }}
# for ovsx, see https://github.com/eclipse/openvsx/blob/master/cli/README.md#publish-extensions
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}