Skip to content

Version Packages (#843) #1063

Version Packages (#843)

Version Packages (#843) #1063

name: Create Pull Request or Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.3.1
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build packages
run: |
pnpm build
- name: Build vscode package
run: |
pnpm --filter "hyperbook-studio" vscode:package
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish VS Code extension
if: steps.changesets.outputs.published == 'true'
run: |
pnpm --filter "hyperbook-studio" vscode:publish
pnpm --filter "hyperbook-studio" ovsx:publish
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
OVSX_PAT: ${{ secrets.OVSX_TOKEN }}