-
Notifications
You must be signed in to change notification settings - Fork 464
43 lines (35 loc) · 1022 Bytes
/
deploy.yml
File metadata and controls
43 lines (35 loc) · 1022 Bytes
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
name: Deploy to npm
on:
schedule:
# Daily run
- cron: "0 4 * * *"
workflow_dispatch: null
permissions:
contents: write
jobs:
deploy:
if: github.repository == 'microsoft/TypeScript-DOM-lib-generator'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true # Ensures submodules are cloned
- uses: actions/setup-node@v6
with:
node-version: "lts/*"
cache: npm
- run: git pull --tags
- run: npm install
- run: npm run build
- run: npm test
- name: Create packages for .d.ts files
run: node deploy/createTypesPackages.js
- name: "Deploy built packages to NPM"
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm i -g npm@latest
npm whoami
node deploy/deployChangedPackages.js
env:
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}