Skip to content

feat(CI&CD): ✨ cI #65

feat(CI&CD): ✨ cI

feat(CI&CD): ✨ cI #65

Workflow file for this run

name: Release
env:
STORE_PATH: ""
on:
push:
branches:
- release/*
defaults:
run:
shell: bash
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
test:
name: Test
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Test
run: pnpm run test
build:
name: Build
runs-on: ubuntu-latest
needs: [prepare, test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Nest CLI
run: pnpm install -g @nestjs/cli
- name: Install dependencies
run: pnpm install
- name: Build Packages
run: pnpm run build
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: dist
path: ./dist
release:
name: Release & Publish
runs-on: ubuntu-latest
needs: [prepare, test, build]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Nest CLI
run: pnpm install -g @nestjs/cli
- name: Install dependencies
run: pnpm install
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: dist
path: ./dist
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
version: pnpm run release:version
publish: pnpm run release:publish
commit: "🎡[CI] Release"
title: "🎡[CI] Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}