-
-
Notifications
You must be signed in to change notification settings - Fork 69
45 lines (36 loc) · 989 Bytes
/
client-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
name: Publish GridifyClient
on:
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: yarn install
- name: Test
run: yarn test
- name: Build
run: yarn build
- name: Extract Version
id: package-version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: Copy README to client directory
run: cp ../README.md .
working-directory: client
- name: Publish to npm
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Create Tag
run: |
git tag c-v${{ env.VERSION }}
git push origin c-v${{ env.VERSION }}