-
Notifications
You must be signed in to change notification settings - Fork 233
92 lines (91 loc) · 2.43 KB
/
ci.yml
File metadata and controls
92 lines (91 loc) · 2.43 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
84
85
86
87
88
89
90
91
92
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_and_test:
name: build and test
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '14' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: check dependencies
run: |
if grep "@definitelytyped/" yarn.lock; then
echo ""
echo "A package in this monorepo is depending on an older version of one of its siblings. \
Ensure all '@definitelytyped/*' dependencies in package.json files use the version \
listed in lerna.json to let lerna automatically keep them in sync."
echo ""
echo "yarn.lock"
cat yarn.lock | grep -A 5 -n "@definitelytyped/"
exit 1
fi
- name: install
run: yarn install --frozen-lockfile
- name: lint
run: yarn lint
- name: test
run: yarn test
publish-packages-dry-run:
needs: build_and_test
uses: ./.github/workflows/publish-packages.yml
with:
dry-run: true
publish-registry-dry-run:
needs: build_and_test
uses: ./.github/workflows/publish-registry.yml
with:
dry-run: true
retag-dry-run:
needs: build_and_test
uses: ./.github/workflows/retag.yml
with:
dry-run: true
deprecate-dry-run:
needs: build_and_test
uses: ./.github/workflows/deprecate.yml
with:
dry-run: true
publish_alpha:
name: publish alpha release
runs-on: ubuntu-latest
needs: build_and_test
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fetch tags
run: git fetch origin +refs/tags/*:refs/tags/*
- name: configure git
run: |
git config user.email "typescriptbot@microsoft.com"
git config user.name "TypeScript Bot"
- uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: https://registry.npmjs.org
- name: install
run: yarn install --frozen-lockfile
- name: format
run: |
yarn format
if [ -n "`git status -s`" ]; then
git commit -am "Format"
git push
fi
- name: build
run: yarn build
- name: publish alpha
run: yarn lerna publish prerelease -y --pre-dist-tag next --preid next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}