Skip to content

Commit fe91214

Browse files
authored
Merge pull request #354 from thornbill/unstable-publish-ci
Add GH action for publishing unstable builds
2 parents c34a21d + 8435a57 commit fe91214

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/sdk-unstable-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: SDK / Unstable branch
1+
name: SDK Unstable Branch
22

33
on:
44
schedule:
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: SDK Unstable Publish
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- openapi-unstable
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }}
13+
steps:
14+
- name: Check out Git repository
15+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
16+
with:
17+
ref: openapi-unstable
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
21+
with:
22+
node-version: 16
23+
check-latest: true
24+
cache: npm
25+
registry-url: https://registry.npmjs.org
26+
27+
- name: Update package version
28+
run: |
29+
VERSION="0.0.0-unstable.$(date +%Y%m%d%H%M)+commit.$(git rev-parse HEAD)" && \
30+
PACKAGE="$(jq --arg v "$VERSION" '.version = $v' package.json)" && \
31+
echo -E "${PACKAGE}" > package.json
32+
33+
- name: Install Node.js dependencies
34+
run: npm ci --no-audit
35+
36+
- name: Publish the SDK to npm
37+
run: npm publish --tag unstable
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)