-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.54 KB
/
Copy pathnpm.yaml
File metadata and controls
53 lines (43 loc) · 1.54 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: npm
on:
push:
tags:
- "*"
jobs:
publish:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: setup java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Install Yarn
run: npm install -g yarn
- name: Run openapi-generator
run: |
npx @openapitools/openapi-generator-cli generate \
--generator-name typescript-axios \
--config ts-openapi-config.json \
--input-spec api.yaml \
--output ts-client
- run: yarn install
working-directory: ts-client
- run: yarn build
working-directory: ts-client
- run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: publish
run: |
git config --global user.email "${GITHUB_ACTOR}"
git config --global user.name "${GITHUB_ACTOR}"
yarn publish --access public --new-version ${RELEASE_VERSION}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
working-directory: ts-client