-
Notifications
You must be signed in to change notification settings - Fork 171
83 lines (70 loc) · 2.34 KB
/
Copy pathrelease-vscode-ext.yml
File metadata and controls
83 lines (70 loc) · 2.34 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Auto-releases on push to main (@next) and stable (@latest).
name: 📦 Release vscode-ext
on:
push:
branches:
- main
- stable
paths:
- 'apps/vscode-ext/**'
- 'packages/superdoc/**'
- 'packages/layout-engine/**'
- 'packages/super-editor/**'
- 'packages/word-layout/**'
- 'packages/preset-geometry/**'
- 'shared/**'
- 'pnpm-workspace.yaml'
- '!**/*.md'
workflow_dispatch:
permissions:
contents: write
packages: write
concurrency:
# Stable releases share the `release-stable` group so @semantic-release/git
# pushes to `stable` serialize across workflows; per-workflow groups would
# let releases race on `git push origin stable`.
group: ${{ github.ref_name == 'stable' && 'release-stable' || format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: ${{ github.ref_name != 'stable' }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- name: Refresh stable branch head
if: github.ref_name == 'stable'
run: |
git fetch origin "${{ github.ref_name }}" --tags
git checkout -B "${{ github.ref_name }}" "origin/${{ github.ref_name }}"
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install
- name: Build superdoc
run: pnpm run build
- name: Test vscode-ext
run: pnpm run test
working-directory: apps/vscode-ext
- name: Build vscode-ext
run: pnpm run build
working-directory: apps/vscode-ext
- name: Release
run: pnpx semantic-release
working-directory: apps/vscode-ext
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
LINEAR_TOKEN: ${{ secrets.LINEAR_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}