-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (33 loc) · 1.21 KB
/
publish-clients.yml
File metadata and controls
38 lines (33 loc) · 1.21 KB
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
name: 'Build and publish clients'
on:
release:
types: [published]
jobs:
build:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate client
# -p properties https://openapi-generator.tech/docs/generators/typescript
run: |
docker run --rm -v ${GITHUB_WORKSPACE}:/local openapitools/openapi-generator-cli:v7.0.0 \
generate -i /local/api/notification-service.yaml \
-g typescript \
-o /local/client \
-p npmName="@commitdev/zero-notification-service-client" \
-p npmVersion="${{ github.event.release.tag_name }}" \
-p platform=node \
-p moduleName="NotificationService"
sudo chmod -R a+rw ${GITHUB_WORKSPACE}
- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: cd client; npm install
- run: cd client; npm run build
## Generated code comes with .gitignore ignoring `dist/` folder, .npmignore will fallback to .gitignore if not exist
- run: echo "" > client/.npmignore
- run: cd client; npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}