-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.64 KB
/
release.yml
File metadata and controls
64 lines (52 loc) · 1.64 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
name: Release and Publish
on:
release:
types: [published]
jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: common/temp/pnpm-store
key: ${{ runner.os }}-rush-pnpm-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-pnpm-
- name: Setup Rush build cache
uses: actions/cache@v4
with:
path: common/temp/build-cache
key: ${{ runner.os }}-rush-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-rush-build-
- name: Rush install
run: node common/scripts/install-run-rush.js install
- name: Rush build
run: node common/scripts/install-run-rush.js build
- name: Generate documentation
run: node common/scripts/install-run-rush.js generate-docs
- name: Verify package contents
run: |
echo "Package contents that will be published:"
cd vscode-extension-toolkit
npm pack --dry-run
- name: Log working directory state
run: |
echo "Logging working directory state before publishing..."
git status
git diff
- name: Publish to NPM
run: |
cd vscode-extension-toolkit
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}