Repository navigation
66 lines (55 loc) · 1.83 KB
/
Copy pathchangeset-version.yml
File metadata and controls
66 lines (55 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Create Pull Request or Release
on:
push:
branches:
- main
permissions:
id-token: write # Required for OIDC
contents: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
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@v4
with:
version: 11.3.0
- uses: actions/setup-node@v3
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build packages
run: |
pnpm build
- name: Test packages
run: pnpm test
# Before the changesets step on purpose. On the run that publishes, the
# version in package.json is already the new one — it was bumped in the
# "Version Packages" pull request that this run is the merge of — so the
# vsix is built with the version that is about to be released.
- name: Build vscode package
run: pnpm --filter "java-memory-playground-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 }}
- name: Publish VS Code extension
if: steps.changesets.outputs.published == 'true'
run: |
pnpm --filter "java-memory-playground-studio" vscode:publish
pnpm --filter "java-memory-playground-studio" ovsx:publish
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
OVSX_PAT: ${{ secrets.OVSX_TOKEN }}