-
Notifications
You must be signed in to change notification settings - Fork 18
50 lines (47 loc) · 1.47 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
name: Release monorepo packages
on:
workflow_dispatch:
branches:
- main
env:
CPU_CORES: 2
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
HUSKY: 0 # disabled husky and lint staged; https://typicode.github.io/husky/#/?id=with-env-variables
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install monorepo dependencies
run: npm ci
- name: Build monorepo
run: npm run build
- name: Check TypeScript types
run: npm run typescript:check-types
- name: Execute tests in monorepo
run: npm run test
- name: Version bump & GitHub release
run: |
git config user.email "[email protected]"
git config user.name "swagger-bot"
npx lerna version --no-private --yes
env:
GH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish monorepo npm packages
run: npx lerna publish from-package --no-private --yes
working-directory: ./packages/apidom-ast
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}