Skip to content

Commit

Permalink
ci: Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin authored Apr 30, 2024
1 parent e7d7d3f commit 5a0cdc6
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,39 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: pnpm

- run: pnpm install --shamefully-hoist
- run: pnpm build

- run: pnpm install --shamefully-hoist=true --frozen-lockfile
- run: pnpm run lint && pnpm test && pnpm run build
release:
name: release
if: ${{ github.ref == 'refs/heads/master' }}
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: simple
package-name: ultimate-nest
- uses: actions/checkout@v4
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.TOKEN_GITHUB }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable

0 comments on commit 5a0cdc6

Please sign in to comment.