-
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (57 loc) · 1.33 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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI/CD
on:
push:
branches: [ main ]
permissions:
contents: write
pull-requests: write
jobs:
tests:
runs-on: ubuntu-latest
name: Tests
services:
mongo:
image: mongo:5
env:
MONGO_INITDB_ROOT_USERNAME: chat
MONGO_INITDB_ROOT_PASSWORD: chat
options: >-
--health-cmd mongo
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017
env:
NODE_ENV: 'test'
DATABASE_URL: 'mongodb://chat:chat@localhost:27017/tests?authSource=admin'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'pnpm'
- run: pnpm i -g pnpm
- run: pnpm i
- run: pnpm run lint:ci
- run: pnpm exec migrate-mongo up
- run: pnpm run test:ci
release-please:
needs:
- tests
runs-on: ubuntu-latest
outputs:
release_created: ${{steps.release.outputs.release_created}}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
token: ${{secrets.GITHUB_TOKEN}}
command: manifest