-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (40 loc) · 1.48 KB
/
release.yaml
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
name: Release
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_DATABASE: potygen
POSTGRES_USER: potygen
POSTGRES_PASSWORD: dev-pass
ports:
- 5432:5432
options: --name postgres --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.13.0'
- name: Initialize Database
run: cat init.sql | docker exec --interactive postgres psql postgres://potygen:dev-pass@postgres:5432/potygen
- name: Initialize Version Specific Database
run: cat pg-version/v13/init-version.sql | docker exec --interactive postgres psql postgres://potygen:dev-pass@postgres:5432/potygen
- name: Initialize Bookstore Example
run: cat examples/bookstore/init.sql | docker exec --interactive postgres psql postgres://potygen:dev-pass@postgres:5432/potygen
- uses: ./.github/actions/yarn-install
- run: yarn build
- run: yarn lint
- run: yarn test:general --runInBand --ci
- run: yarn test:13 --runInBand --ci
env:
POSTGRES_CONNECTION: postgres://potygen:dev-pass@localhost:5432/potygen
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}