204000aabc
Resolve 3 merge conflicts and renumber the automation_hooks migration to follow main's migration chain (036_add_document_translation_fields). Conflicts resolved: - app/api/__init__.py: add automation_router alongside main's new routers - app/utils/settings_service.py: add automation_hooks_enabled alongside compliance_enabled - tests/conftest.py: add AutomationHook alongside AuditLog/ComplianceTemplate imports Migration renumbered: - 027_add_automation_hooks → 037_add_automation_hooks - down_revision: 026_add_scheduled_jobs → 036_add_document_translation_fields Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
81 lines
2.1 KiB
YAML
81 lines
2.1 KiB
YAML
name: Semantic Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: write
|
|
packages: write
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
jobs:
|
|
release:
|
|
name: Semantic Release
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'christianlouis/DocuElevate'
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install python-semantic-release
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Run Semantic Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
semantic-release version --print
|
|
semantic-release version
|
|
semantic-release publish
|
|
|
|
- name: Update changelog if no new version was released
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
if git diff --name-only HEAD~1 2>/dev/null | grep -q CHANGELOG.md; then
|
|
echo "CHANGELOG.md was already updated by semantic-release version"
|
|
else
|
|
semantic-release changelog
|
|
if ! git diff --quiet CHANGELOG.md; then
|
|
git add CHANGELOG.md
|
|
git commit -m "docs(changelog): update changelog [skip ci]"
|
|
git push
|
|
fi
|
|
fi
|
|
|
|
- name: Update build metadata files if changed
|
|
run: |
|
|
for f in VERSION BUILD_DATE GIT_SHA RUNTIME_INFO; do
|
|
if [ -f "$f" ]; then
|
|
git add -f "$f"
|
|
fi
|
|
done
|
|
if ! git diff --staged --quiet; then
|
|
git commit -m "chore(release): update build metadata files [skip ci]"
|
|
git push
|
|
fi
|