-
Notifications
You must be signed in to change notification settings - Fork 5
71 lines (66 loc) · 1.62 KB
/
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
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
70
71
name: publish
on:
push:
branches:
- master
paths:
- package.json
env:
CI: true
jobs:
build:
runs-on: ubuntu-latest
# services:
# redis:
# image: redis
# ports:
# - 6379:6379
steps:
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- uses: miyataka/elasticsearch-github-actions@1
with:
stack-version: '7.6.2'
- uses: actions/setup-node@v3
- uses: actions/checkout@v3
- run: npm install
- run: npm test
publish-npm:
needs: [build]
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed by GitHub Release
- name: publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
publish-gpr:
needs: [build]
runs-on: ubuntu-latest
environment: ghpm
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
registry-url: https://npm.pkg.github.com/
scope: '@haraka'
- name: rename package with @haraka scope
run: node .release/npm/prepend-scope.cjs @haraka
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}