-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (41 loc) · 1.63 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
# Copyright 2020, 2023, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.
# ---------------------------------------------------------------------------
# Coherence JavaScript Client GitHub Release Actions build.
# ---------------------------------------------------------------------------
name: NPM publish CD workflow
on:
release:
# This specifies that the build will be triggered when we publish a release
types: [published]
jobs:
build:
# Run on latest version of ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}
# install Node.js
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.15.x
# Specifies the registry, this field is required!
registry-url: https://registry.npmjs.org/
# install protoc
- run: curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v22.2/protoc-22.2-linux-x86_64.zip"
- run: unzip protoc-22.2-linux-x86_64.zip -d /tmp/grpc
- run: echo "/tmp/grpc/bin" >> $GITHUB_PATH
- run: npm install
# run unit tests
- run: COHERENCE_VERSION=22.06.11 npm run test-cycle
- run: COHERENCE_VERSION=24.09.3 npm run test-cycle
- run: npm install --no-save typedoc
# generate dist which runs other tasks
- run: npm run dist
# publish to NPM
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }}