-
-
Notifications
You must be signed in to change notification settings - Fork 40
69 lines (60 loc) · 1.78 KB
/
publish.yml
File metadata and controls
69 lines (60 loc) · 1.78 KB
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
name: Publish to NPM
on: [workflow_dispatch]
defaults:
run:
working-directory: src
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
registry-url: "https://registry.npmjs.org"
node-version-file: ./src/.nvmrc
- name: Install dependencies
run: npm ci
- name: Copy README.md
run: npm run copy:readme
- name: Build
run: npm run build
env:
NODE_ENV: production
- name: Set public publishing
run: npm config set access public
- name: Publish Dumbo package on NPM 📦
run: |
VERSION=$(node -p "require('./package.json').version")
if [[ $VERSION == *"beta"* ]]; then
TAG="beta"
elif [[ $VERSION == *"alpha"* ]]; then
TAG="alpha"
elif [[ $VERSION == *"rc"* ]]; then
TAG="rc"
else
TAG="latest"
fi
npm publish --w @event-driven-io/dumbo --tag $TAG
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: production
- name: Publish Pongo package on NPM 📦
run: |
VERSION=$(node -p "require('./package.json').version")
if [[ $VERSION == *"beta"* ]]; then
TAG="beta"
elif [[ $VERSION == *"alpha"* ]]; then
TAG="alpha"
elif [[ $VERSION == *"rc"* ]]; then
TAG="rc"
else
TAG="latest"
fi
npm publish --w @event-driven-io/pongo --tag $TAG
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: production