Skip to content

Commit 5a0cdc6

Browse files
authored
ci: Update ci.yml
1 parent e7d7d3f commit 5a0cdc6

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

.github/workflows/ci.yml

+32-16
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,39 @@ on: [push, pull_request]
44
jobs:
55
build:
66
runs-on: ubuntu-latest
7-
services:
8-
postgres:
9-
image: postgres:15-alpine
10-
env:
11-
POSTGRES_USER: postgres
12-
POSTGRES_PASSWORD: postgres
13-
POSTGRES_DB: postgres
14-
ports:
15-
- 5432:5432
167
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-node@v3
19-
with:
20-
node-version: 20.x
21-
- uses: pnpm/action-setup@v2
8+
- uses: actions/checkout@v4
9+
- uses: pnpm/action-setup@v3
2210
with:
2311
version: 8
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20.x
15+
cache: pnpm
16+
17+
- run: pnpm install --shamefully-hoist
18+
- run: pnpm build
2419

25-
- run: pnpm install --shamefully-hoist=true --frozen-lockfile
26-
- run: pnpm run lint && pnpm test && pnpm run build
20+
release:
21+
name: release
22+
if: ${{ github.ref == 'refs/heads/master' }}
23+
needs:
24+
- build
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: google-github-actions/release-please-action@v4
28+
id: release
29+
with:
30+
release-type: simple
31+
package-name: ultimate-nest
32+
- uses: actions/checkout@v4
33+
- name: tag stable versions
34+
if: ${{ steps.release.outputs.release_created }}
35+
run: |
36+
git config user.name github-actions[bot]
37+
git config user.email github-actions[bot]@users.noreply.github.com
38+
git remote add gh-token "https://${{ secrets.TOKEN_GITHUB }}@github.com/google-github-actions/release-please-action.git"
39+
git tag -d stable || true
40+
git push origin :stable || true
41+
git tag -a stable -m "Last Stable Release"
42+
git push origin stable

0 commit comments

Comments
 (0)