Skip to content

Commit

Permalink
split repo for stable and continuous releases
Browse files Browse the repository at this point in the history
  • Loading branch information
prolic committed Nov 14, 2024
1 parent 5aca7d3 commit 2f24743
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/flatpak-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,37 @@ jobs:
- name: Setup gh-pages branch
run: |
git checkout gh-pages 2>/dev/null || git checkout -b gh-pages
rm -rf repo
rm -rf repo-stable repo-continuous
- name: Download Flatpak Bundle
uses: actions/download-artifact@v3
with:
name: flatpak-bundle

- name: Create/Update Repository
run: |
mkdir -p repo
flatpak build-update-repo --generate-static-deltas repo
# Create separate repos for stable and continuous
mkdir -p repo-stable repo-continuous
# Initialize repos if they don't exist
[ ! -d "repo-stable/objects" ] && flatpak build-update-repo repo-stable
[ ! -d "repo-continuous/objects" ] && flatpak build-update-repo repo-continuous
if [ -f "futr.flatpak" ]; then
flatpak build-import-bundle repo futr.flatpak
# Determine which repo to update based on the source workflow
if [[ "${{ github.event.workflow_run.name }}" == "Flatpak Tagged Release" ]]; then
flatpak build-import-bundle repo-stable futr.flatpak
flatpak build-update-repo --generate-static-deltas repo-stable
else
flatpak build-import-bundle repo-continuous futr.flatpak
flatpak build-update-repo --generate-static-deltas repo-continuous
fi
fi
- name: Commit Repository Updates
run: |
git add repo
git commit -m "Update Flatpak repository" || echo "No changes to commit"
git add repo-stable repo-continuous
git commit -m "Update Flatpak repositories" || echo "No changes to commit"
git push origin gh-pages
- name: Setup Pages
Expand All @@ -59,7 +76,7 @@ jobs:
- name: Upload Repository
uses: actions/upload-pages-artifact@v3
with:
path: 'repo'
path: '.'

- name: Deploy to GitHub Pages
id: deployment
Expand Down

0 comments on commit 2f24743

Please sign in to comment.