-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (47 loc) · 1.64 KB
/
node_sdk_publish.yaml
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
49
50
51
52
53
54
55
56
57
name: Release permit Node SDK
on: push
# release:
# types: [published]
jobs:
publish_node_sdk:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
token: ${{ secrets.NPM_TOKEN }}
- name: Set git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "elimoshkovich"
- name: Install dependencies
run: |
rm -rf node_modules
yarn install
yarn run build
yarn docs ; git add docs/ ; git commit -m "update tsdoc"
- name: Run tests
run: yarn test
# - name: Bump version at package.json
# run: |
# sed -i "s/\"version\": \".*\"/\"version\": \"${{ github.event.release.tag_name }}\"/" package.json
# cat package.json
# - name: Publish package to NPM
# run: yarn publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Commit package.json changes
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "elimoshkovich"
# git add package.json
# git commit -m "bump package.json version to ${{ github.event.release.tag_name }}"
# - name: Push changes to GitHub
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.TOKEN_GITHUB }}
# branch: main