Skip to content

Commit 6143039

Browse files
SDK regeneration (#3)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 2de13c3 commit 6143039

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,30 @@ jobs:
2828

2929
- name: Compile
3030
run: yarn && yarn test
31+
32+
publish:
33+
needs: [ compile, test ]
34+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout repo
38+
uses: actions/checkout@v3
39+
- name: Set up node
40+
uses: actions/setup-node@v3
41+
- name: Install dependencies
42+
run: yarn install
43+
- name: Build
44+
run: yarn build
45+
46+
- name: Publish to npm
47+
run: |
48+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
49+
if [[ ${GITHUB_REF} == *alpha* ]]; then
50+
npm publish --access public --tag alpha
51+
elif [[ ${GITHUB_REF} == *beta* ]]; then
52+
npm publish --access public --tag beta
53+
else
54+
npm publish --access public
55+
fi
56+
env:
57+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)