-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (54 loc) · 1.45 KB
/
release.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
49
50
51
52
53
54
55
56
57
name: release
on:
push:
branches:
- main
jobs:
publish-release:
if: "github.repository == 'd-velop/dvelop-sdk-node'"
name: Publish to npm as latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install npm dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Set release credentials
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag packages as latest on npm
run: npm run publish:latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
release-docs:
name: release documentation
runs-on: ubuntu-latest
needs: publish-release
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install npm dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Generate docs
run: npm run docs
- name: Commit docs to gh-pages
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: docs