-
-
Notifications
You must be signed in to change notification settings - Fork 53
62 lines (53 loc) · 1.87 KB
/
release.yml
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
name: Changelog
on:
push:
branches:
- main
jobs:
release:
name: Changelog
if: ${{ github.repository_owner == 'withastro' }}
runs-on: ubuntu-latest
steps:
- name: Check out branch
uses: actions/checkout@v4
with:
fetch-depth: 0 # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
- name: Setup PNPM
uses: pnpm/action-setup@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
version: pnpm run version
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prepare vscode folder
if: steps.changesets.outputs.published == 'true'
working-directory: ./packages/vscode
run: |
sleep 60s
rm -rf node_modules
npm i
npm run build:grammar
- name: Publish to VSCode Marketplace
if: steps.changesets.outputs.published == 'true'
working-directory: ./packages/vscode
run: |
npm run build
npx vsce publish -p ${{ secrets.VSCE_TOKEN }} --target win32-x64 win32-arm64 linux-x64 linux-arm64 linux-armhf darwin-x64 darwin-arm64 alpine-x64 alpine-arm64
- name: Publish to OpenVSX
if: steps.changesets.outputs.published == 'true'
working-directory: ./packages/vscode
run: |
npm run build
npx ovsx publish -p ${{ secrets.OVSX_TOKEN }} --target win32-x64 win32-arm64 linux-x64 linux-arm64 linux-armhf darwin-x64 darwin-arm64 alpine-x64 alpine-arm64