-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (36 loc) · 1.14 KB
/
publish-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
name: Publish Release to npmjs
on:
push:
tags:
- ams-v**
jobs:
publish-npmjs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Get the version
id: get_version
run: echo "VERSION=$(echo ${GITHUB_REF##*/} | cut -d v -f 2)" >> $GITHUB_OUTPUT
- run: npm install
- run: npm run compile
- run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Update Embedded Player
if: success()
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.REPO_COMMUNICATION }}" \
https://api.github.com/repos/ant-media/StreamApp/actions/workflows/update-embedded-player.yml/dispatches \
-d '{"ref":"master"}'