forked from Sunbird-inQuiry/player
-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (47 loc) · 1.47 KB
/
publish-package.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
name: 🚀 Publish NPM Package
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
actions: write
packages: write
pull-requests: write
steps:
- name: 📥 Checkout Code Repository
uses: actions/checkout@v4
- name: 🔧 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: List files
run: ls -la ~/
- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=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" > ~/.npmrc
- name: Display .npmrc contents
run: cat ~/.npmrc
- name: 📦 Install Dependencies
run: npm ci
- name: 🛠️ Build Library
run: npm run build-lib
- name: List contents of dist/quml-library
run: ls -la dist/quml-library
- name: 🚢 Publish to NPM
run: |
cd dist/quml-library
pwd # Print the current directory
ls -la # List the contents to ensure the package is present
npm pack
echo "-----------------------------------Package is packed---------------------------------------------"
npm publish tekdi-sunbird-quml-player-*.tgz --tag=beta --access public
env:
NODE_AUTH_TOKEN: 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