save progress
This commit is contained in:
@@ -532,6 +532,233 @@ jobs:
|
||||
path: out/release
|
||||
retention-days: 90
|
||||
|
||||
# ===========================================================================
|
||||
# GENERATE CHANGELOG (AI-assisted)
|
||||
# ===========================================================================
|
||||
|
||||
generate-changelog:
|
||||
name: Generate Changelog
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [validate, build-modules]
|
||||
if: always() && needs.validate.result == 'success'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Find previous release tag
|
||||
id: prev-tag
|
||||
run: |
|
||||
PREV_TAG=$(git tag -l "suite-*" --sort=-creatordate | head -1)
|
||||
echo "Previous tag: ${PREV_TAG:-none}"
|
||||
echo "prev_tag=${PREV_TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate changelog
|
||||
env:
|
||||
AI_API_KEY: ${{ secrets.AI_API_KEY }}
|
||||
run: |
|
||||
VERSION="${{ needs.validate.outputs.version }}"
|
||||
CODENAME="${{ needs.validate.outputs.codename }}"
|
||||
PREV_TAG="${{ steps.prev-tag.outputs.prev_tag }}"
|
||||
|
||||
mkdir -p out/docs
|
||||
|
||||
ARGS="$VERSION --codename $CODENAME --output out/docs/CHANGELOG.md"
|
||||
if [[ -n "$PREV_TAG" ]]; then
|
||||
ARGS="$ARGS --from-tag $PREV_TAG"
|
||||
fi
|
||||
if [[ -n "$AI_API_KEY" ]]; then
|
||||
ARGS="$ARGS --ai"
|
||||
fi
|
||||
|
||||
python3 .gitea/scripts/release/generate_changelog.py $ARGS
|
||||
|
||||
echo "=== Generated Changelog ==="
|
||||
head -50 out/docs/CHANGELOG.md
|
||||
|
||||
- name: Upload changelog
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: changelog-${{ needs.validate.outputs.version }}
|
||||
path: out/docs/CHANGELOG.md
|
||||
retention-days: 90
|
||||
|
||||
# ===========================================================================
|
||||
# GENERATE SUITE DOCUMENTATION
|
||||
# ===========================================================================
|
||||
|
||||
generate-suite-docs:
|
||||
name: Generate Suite Docs
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [validate, generate-changelog, release-manifest]
|
||||
if: always() && needs.validate.result == 'success'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install python-dateutil
|
||||
|
||||
- name: Download changelog
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: changelog-${{ needs.validate.outputs.version }}
|
||||
path: changelog
|
||||
|
||||
- name: Find previous version
|
||||
id: prev-version
|
||||
run: |
|
||||
PREV_TAG=$(git tag -l "suite-*" --sort=-creatordate | head -1)
|
||||
if [[ -n "$PREV_TAG" ]]; then
|
||||
PREV_VERSION=$(echo "$PREV_TAG" | sed 's/suite-//')
|
||||
echo "prev_version=$PREV_VERSION" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Generate suite documentation
|
||||
run: |
|
||||
VERSION="${{ needs.validate.outputs.version }}"
|
||||
CODENAME="${{ needs.validate.outputs.codename }}"
|
||||
CHANNEL="${{ needs.validate.outputs.channel }}"
|
||||
PREV="${{ steps.prev-version.outputs.prev_version }}"
|
||||
|
||||
ARGS="$VERSION $CODENAME --channel $CHANNEL"
|
||||
if [[ -f "changelog/CHANGELOG.md" ]]; then
|
||||
ARGS="$ARGS --changelog changelog/CHANGELOG.md"
|
||||
fi
|
||||
if [[ -n "$PREV" ]]; then
|
||||
ARGS="$ARGS --previous $PREV"
|
||||
fi
|
||||
|
||||
python3 .gitea/scripts/release/generate_suite_docs.py $ARGS
|
||||
|
||||
echo "=== Generated Documentation ==="
|
||||
ls -la docs/releases/$VERSION/
|
||||
|
||||
- name: Upload suite docs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: suite-docs-${{ needs.validate.outputs.version }}
|
||||
path: docs/releases/${{ needs.validate.outputs.version }}
|
||||
retention-days: 90
|
||||
|
||||
# ===========================================================================
|
||||
# GENERATE DOCKER COMPOSE FILES
|
||||
# ===========================================================================
|
||||
|
||||
generate-compose:
|
||||
name: Generate Docker Compose
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [validate, release-manifest]
|
||||
if: always() && needs.validate.result == 'success'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Generate Docker Compose files
|
||||
run: |
|
||||
VERSION="${{ needs.validate.outputs.version }}"
|
||||
CODENAME="${{ needs.validate.outputs.codename }}"
|
||||
|
||||
mkdir -p out/compose
|
||||
|
||||
# Standard compose
|
||||
python3 .gitea/scripts/release/generate_compose.py \
|
||||
"$VERSION" "$CODENAME" \
|
||||
--output out/compose/docker-compose.yml
|
||||
|
||||
# Air-gap variant
|
||||
python3 .gitea/scripts/release/generate_compose.py \
|
||||
"$VERSION" "$CODENAME" \
|
||||
--airgap \
|
||||
--output out/compose/docker-compose.airgap.yml
|
||||
|
||||
echo "=== Generated Compose Files ==="
|
||||
ls -la out/compose/
|
||||
|
||||
- name: Upload compose files
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: compose-${{ needs.validate.outputs.version }}
|
||||
path: out/compose
|
||||
retention-days: 90
|
||||
|
||||
# ===========================================================================
|
||||
# COMMIT DOCS TO REPOSITORY
|
||||
# ===========================================================================
|
||||
|
||||
commit-docs:
|
||||
name: Commit Documentation
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [validate, generate-suite-docs, generate-compose, create-release]
|
||||
if: needs.validate.outputs.dry_run != 'true' && needs.create-release.result == 'success'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download suite docs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: suite-docs-${{ needs.validate.outputs.version }}
|
||||
path: docs/releases/${{ needs.validate.outputs.version }}
|
||||
|
||||
- name: Download compose files
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: compose-${{ needs.validate.outputs.version }}
|
||||
path: docs/releases/${{ needs.validate.outputs.version }}
|
||||
|
||||
- name: Commit documentation
|
||||
run: |
|
||||
VERSION="${{ needs.validate.outputs.version }}"
|
||||
CODENAME="${{ needs.validate.outputs.codename }}"
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git add "docs/releases/${VERSION}"
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "No documentation changes to commit"
|
||||
else
|
||||
git commit -m "docs: add release documentation for ${VERSION} ${CODENAME}
|
||||
|
||||
Generated documentation for StellaOps ${VERSION} \"${CODENAME}\"
|
||||
|
||||
- README.md
|
||||
- CHANGELOG.md
|
||||
- services.md
|
||||
- upgrade-guide.md
|
||||
- docker-compose.yml
|
||||
- docker-compose.airgap.yml
|
||||
- manifest.yaml
|
||||
|
||||
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
||||
|
||||
Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
||||
|
||||
git push
|
||||
echo "Documentation committed and pushed"
|
||||
fi
|
||||
|
||||
# ===========================================================================
|
||||
# CREATE GITEA RELEASE
|
||||
# ===========================================================================
|
||||
@@ -651,7 +878,7 @@ jobs:
|
||||
summary:
|
||||
name: Release Summary
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [validate, build-modules, build-containers, build-cli, build-helm, release-manifest, create-release]
|
||||
needs: [validate, build-modules, build-containers, build-cli, build-helm, release-manifest, generate-changelog, generate-suite-docs, generate-compose, create-release, commit-docs]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Generate Summary
|
||||
@@ -674,7 +901,11 @@ jobs:
|
||||
echo "| Build CLI | ${{ needs.build-cli.result }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Build Helm | ${{ needs.build-helm.result }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Release Manifest | ${{ needs.release-manifest.result }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Generate Changelog | ${{ needs.generate-changelog.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Generate Suite Docs | ${{ needs.generate-suite-docs.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Generate Compose | ${{ needs.generate-compose.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Create Release | ${{ needs.create-release.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Commit Documentation | ${{ needs.commit-docs.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Check for failures
|
||||
if: contains(needs.*.result, 'failure')
|
||||
|
||||
Reference in New Issue
Block a user