forked from NativeScript/nativescript-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (33 loc) · 1.04 KB
/
npm_release_doctor.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
name: '@nativescript/doctor -> npm'
on:
push:
branches: [ 'main' ]
paths:
- 'packages/doctor/**'
workflow_dispatch:
defaults:
run:
working-directory: packages/doctor
env:
NPM_TAG: 'next'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup
run: npm install
- name: Generate Version
run: |
echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV
- name: Bump Version
run: npm --no-git-tag-version version $NPM_VERSION
- name: Build @nativescript/doctor
run: npm pack
- name: Publish @nativescript/doctor
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
echo "Publishing @nativescript/doctor@$NPM_VERSION to NPM with tag $NPM_TAG..."
npm publish nativescript-doctor-$NPM_VERSION.tgz --tag $NPM_TAG