-
-
Notifications
You must be signed in to change notification settings - Fork 27
42 lines (36 loc) · 1.18 KB
/
sdk-unstable-publish.yaml
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
name: SDK Unstable Publish
on:
workflow_dispatch:
push:
branches:
- openapi-unstable
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }}
steps:
- name: Check out Git repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: openapi-unstable
- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
check-latest: true
cache: npm
registry-url: https://registry.npmjs.org
- name: Update package version
run: |
VERSION="0.0.0-unstable.$(date +%Y%m%d%H%M)+commit.$(git rev-parse HEAD)" && \
PACKAGE="$(jq --arg v "$VERSION" '.version = $v' package.json)" && \
echo -E "${PACKAGE}" > package.json
- name: Install Node.js dependencies
run: npm ci --no-audit
- name: Publish the SDK to npm
run: npm publish --tag unstable --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}