-
Notifications
You must be signed in to change notification settings - Fork 84
44 lines (42 loc) · 1.26 KB
/
deploy-npm-package.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: Build and Publish NPM Package 🚀
on:
push:
paths:
- 'assets/apps/components/**'
branches:
- development
jobs:
publish-package:
runs-on: ubuntu-latest
if: github.actor != 'pirate-bot'
strategy:
matrix:
node-version: [ 14.x ]
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
with:
persist-credentials: false
- name: Setup node ${{ matrix.node-version }} 🔧
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- name: Version and Publish 📦
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd ./assets/apps/components
npm version patch
npm publish
- name: Commit files 📦
run: |
git config --local user.email "${{ secrets.BOT_EMAIL }}"
git config --local user.name "pirate-bot"
git add assets/apps/components/package.json
git commit -m "Sync components package version"
- name: Push changes 📦
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN }}
branch: ${{ github.ref }}