-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.12 KB
/
npm-publish.yml
File metadata and controls
37 lines (35 loc) · 1.12 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
name: NPM Publish
on:
push:
branches:
- master
- beta
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v1
with:
file-name: packages/ui-components/package.json
file-url: https://unpkg.com/@lambdacurry/component-library/package.json
static-checking: localIsNew
- uses: actions/setup-node@v1
if: steps.check.outputs.changed == 'true'
with:
node-version: 14
- name: Install Dependencies
if: steps.check.outputs.changed == 'true'
run: yarn && npx nx build ui-components --prod
- name: Prepare & Publish
if: steps.check.outputs.changed == 'true'
id: publish
uses: JS-DevTools/npm-publish@v1
with:
package: packages/ui-components/package.json
token: ${{ secrets.NPM_SECRET }}
- if: steps.publish.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"