Add stable SDK publish workflow

This commit is contained in:
Bill Thornton 2022-09-15 00:32:50 -04:00
parent fe8540ddd9
commit 7eb8f72581
3 changed files with 29 additions and 3 deletions

28
.github/workflows/sdk-publish.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
name: SDK Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }}
steps:
- name: Check out Git repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up Node.js
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
node-version: 16
check-latest: true
cache: npm
- name: Install Node.js dependencies
run: npm ci --no-audit
- name: Publish the SDK to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

1
.npmrc
View File

@ -1,2 +1,3 @@
access=public
lockfile-version=3
save-exact=true

View File

@ -12,9 +12,6 @@
"type": "git",
"url": "https://github.com/jellyfin/jellyfin-sdk-typescript.git"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "npm run build:generated-client && npm run build:sdk",
"build:generated-client": "openapi-generator-cli generate",