-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (46 loc) · 1.55 KB
/
publish-cli.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
name: Publish CLI to NPM (Private)
on:
push:
branches:
- main
paths:
- 'src/connector-cli/**' # Only trigger when files under the cli package have changed
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PACKAGE_SECRET }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
scope: '@chili-publish'
- name: Install dependencies
run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_SECRET }}
- name: Build
run: yarn workspace @chili-publish/connector-cli run build
- name: Bump version
# Current master has an issue https://github.com/phips28/gh-action-bump-version/issues/237
# uses: phips28/gh-action-bump-version@master
uses: phips28/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_SECRET }}
PACKAGEJSON_DIR: 'src/connector-cli'
with:
minor-wording: 'Feat,Feature,FEATURE'
major-wording: 'Breaking,BREAKING'
patch-wording: 'Fix,FIX'
commit-message: 'CI: bumps version to {{version}} [skip ci]'
- name: Publish
run: yarn publish src/connector-cli
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_SECRET }}