-
Notifications
You must be signed in to change notification settings - Fork 26
53 lines (43 loc) · 1.39 KB
/
publish.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
51
52
53
name: Publish NPM package
on:
workflow_dispatch:
inputs:
version:
type: choice
required: true
description: Bump version
options:
- patch
- minor
- major
jobs:
build:
name: Build & Publish NPM package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get sources
uses: actions/checkout@v4
- name: Run npm install - root
run: npm install --no-audit --no-fund
- name: Run npm install - devextreme-schematics
working-directory: packages/devextreme-schematics
run: npm install --no-audit --no-fund
- name: Test devextreme-schematics
working-directory: packages/devextreme-schematics
run: npm run test
- name: Build devextreme-schematics
working-directory: packages/devextreme-schematics
run: npm run build
- uses: fregante/setup-git-user@v2
- name: Update NPM config
run: npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Publish package
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx lerna version ${{ github.event.inputs.version }} -y --no-push
git push -f --follow-tags --no-verify --atomic origin master
npx lerna publish from-git -y