Skip to content

refactor(policy_details): split the policyList to smaller components … #13

refactor(policy_details): split the policyList to smaller components …

refactor(policy_details): split the policyList to smaller components … #13

name: Release and Deploy
on:
push:
branches:
- main
jobs:
release-and-build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# -----------------------------------------------------------
# 1. SEMANTIC TAGGING (Configured for Conventional Commits)
# -----------------------------------------------------------
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch
release_branches: main
custom_release_rules: |
feat:minor:✨ New Features
fix:patch:🐛 Bug Fixes
perf:patch:⚡ Performance Improvements
docs:patch:📚 Documentation
style:patch:🎨 Style Changes
refactor:patch:♻️ Code Refactoring
# -----------------------------------------------------------
# 2. CREATE GITHUB RELEASE
# -----------------------------------------------------------
- name: Create a GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}
# -----------------------------------------------------------
# 3. DOCKER BUILD & PUSH
# -----------------------------------------------------------
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/policynest:${{ steps.tag_version.outputs.new_tag }}
${{ secrets.DOCKER_USERNAME }}/policynest:latest
cache-from: type=gha
cache-to: type=gha,mode=max