617e778a48
Add dual-channel release strategy for stable and beta releases: Release Channels: - Stable channel: production-ready releases (stable, latest, v2.3.0) - Beta channel: early access features (beta, v2.3.0-beta.1) - Configurable via PICPEAK_CHANNEL environment variable Update Notifications: - Admin dashboard shows available updates for configured channel - Checks GitHub Releases API with 1-hour cache - Can be disabled with UPDATE_CHECK_ENABLED=false CI/CD Changes: - New release-please-beta.yml workflow for beta prereleases - Docker build workflow produces stable/beta tags based on branch - Beta versions use v2.3.0-beta.1 format New Files: - .github/workflows/release-please-beta.yml - release-please-config-beta.json - .release-please-manifest-beta.json - backend/src/services/updateCheckService.js - frontend/src/components/admin/UpdateNotification.tsx Modified Files: - docker-compose.production.yml (channel selection) - .env.example (PICPEAK_CHANNEL, UPDATE_CHECK_ENABLED) - backend/src/routes/adminSystem.js (/updates endpoint) - frontend components (VersionInfo, AdminDashboard) - i18n locales (en.json, de.json) - README.md and DEPLOYMENT_GUIDE.md (documentation)
73 lines
2.4 KiB
YAML
73 lines
2.4 KiB
YAML
name: Release Please (Beta)
|
|
|
|
on:
|
|
push:
|
|
branches: [beta]
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
release_created: ${{ steps.release.outputs.release_created }}
|
|
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
version: ${{ steps.release.outputs.version }}
|
|
steps:
|
|
- name: Run Release Please
|
|
uses: googleapis/release-please-action@v4
|
|
id: release
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
config-file: release-please-config-beta.json
|
|
manifest-file: .release-please-manifest-beta.json
|
|
target-branch: beta
|
|
|
|
- name: Output Release Info
|
|
if: ${{ steps.release.outputs.release_created }}
|
|
run: |
|
|
echo "## Beta Release Created!" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "**Tag:** ${{ steps.release.outputs.tag_name }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "**Version:** ${{ steps.release.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "Docker images will be built and tagged with this beta version." >> $GITHUB_STEP_SUMMARY
|
|
|
|
# Sync version to package.json files after release
|
|
sync-versions:
|
|
needs: release-please
|
|
if: ${{ needs.release-please.outputs.release_created }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: beta
|
|
|
|
- name: Update package.json versions
|
|
run: |
|
|
VERSION="${{ needs.release-please.outputs.version }}"
|
|
echo "Updating package.json files to version $VERSION"
|
|
|
|
# Update backend package.json
|
|
cd backend
|
|
npm version $VERSION --no-git-tag-version --allow-same-version
|
|
cd ..
|
|
|
|
# Update frontend package.json
|
|
cd frontend
|
|
npm version $VERSION --no-git-tag-version --allow-same-version
|
|
cd ..
|
|
|
|
- name: Commit version updates
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add backend/package.json frontend/package.json
|
|
git diff --staged --quiet || git commit -m "chore: sync package.json versions to ${{ needs.release-please.outputs.version }}"
|
|
git push
|