Skip to content

chore: update pr title checker action to latest #163

chore: update pr title checker action to latest

chore: update pr title checker action to latest #163

name: 'Deploy'
on:
push:
branches: [main, develop]
concurrency:
group: ${{ github.ref }}
jobs:
lint-and-test:
name: Lint and unit test
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }} branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: pnpm/action-setup@v2
with:
version: 7.0.1
- uses: actions/setup-node@v4
with:
node-version: 18.13.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Run lint, type checks and tests
run: |
pnpm concurrently -g \
"pnpm lint" \
"pnpm check:types" \
"pnpm test -- --changed ${{ github.ref }}"
deploy-to-dev:
name: Deploy App to Dev
if: github.event.ref == 'refs/heads/develop'
needs: lint-and-test
uses: ./.github/workflows/deploy-action.yml
with:
environment: dev
branch: develop
netlify_site_alias: dev
secrets:
app_env: ${{ secrets.APP_ENV }}
netlify_pat: ${{ secrets.NETLIFY_PAT }}
netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }}
release:
name: Release
if: github.event.ref == 'refs/heads/main'
needs: lint-and-test
runs-on: ubuntu-latest
outputs:
skipped: ${{ steps.changelog.outputs.skipped }}
tag: ${{ steps.changelog.outputs.tag }}
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.PAT }}
- id: changelog
name: Conventional Changelog
uses: TriPSs/conventional-changelog-action@v3
with:
git-message: 'chore(release): {version} [no ci]'
git-user-email: emnnipal@gmail.com
git-user-name: Emmanuel Nipal
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file: 'false'
- name: Create Github Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
deploy-to-production:
name: Deploy App to Production
if: needs.release.outputs.skipped == 'false'
needs: release
uses: ./.github/workflows/deploy-action.yml
with:
environment: production
branch: 'refs/tags/${{needs.release.outputs.tag}}'
secrets:
app_env: ${{ secrets.APP_ENV }}
netlify_pat: ${{ secrets.NETLIFY_PAT }}
netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }}