This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (63 loc) · 2.27 KB
/
release.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build and publish to NPM
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- stable
- unstable
steps:
- uses: actions/checkout@v2.4.0
with:
ref: "master"
- name: Setup node environment for NPMJS
uses: actions/setup-node@v2.5.0
with:
node-version: 14
cache: "npm"
registry-url: "https://registry.npmjs.org"
cache-dependency-path: |
stable/package-lock.json
unstable/package-lock.json
- name: Get package version
id: version
run: echo "::set-output name=number::$(echo $(cat package.json | jq -r '.version'))"
working-directory: ./${{ matrix.version }}
- name: Install dependencies
run: npm ci --no-audit
working-directory: ./${{ matrix.version }}
- name: Publish to npm
run: npm publish --tag ${{ matrix.version }} --access public
working-directory: ./${{ matrix.version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Set as latest in npm
if: ${{ matrix.version == 'stable' }}
run: npm dist-tag add @jellyfin/client-axios@${{ steps.version.outputs.number }} latest
working-directory: ./${{ matrix.version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup node environment for GitHub Package Registry
uses: actions/setup-node@v2.5.0
with:
node-version: 14
cache: "npm"
registry-url: "https://npm.pkg.github.com"
cache-dependency-path: |
stable/package-lock.json
unstable/package-lock.json
- name: Publish to GitHub Package registry
run: npm publish --tag ${{ matrix.version }} --access public
working-directory: ./${{ matrix.version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
- name: Set as latest in GitHub Packages
if: ${{ matrix.version == 'stable' }}
run: npm dist-tag add @jellyfin/client-axios@${{ steps.version.outputs.number }} latest
working-directory: ./${{ matrix.version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}