-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 998 Bytes
/
release-publish.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
name: Publish (NPM)
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.DTL_CI_AT }}
- name: Setup NodeJS 16
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm publish
# Trigger deploy to CDN
- name: Obtain release version
run: echo "RELEASE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Tirgger deploy to CDN
uses: benc-uk/workflow-dispatch@v1
with:
workflow: "Deploy (CDN)"
token: ${{ secrets.DTL_CI_AT }}
inputs: '{ "version": "${{ env.RELEASE_VERSION }}" }'