-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Update Flatpak Repository | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Flatpak Tagged Release", "Flatpak Build and Release"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
update-repo: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Flatpak | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y flatpak flatpak-builder | ||
- name: Download Flatpak Bundle | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: flatpak-bundle | ||
path: ./ | ||
|
||
- name: Create/Update Repository | ||
run: | | ||
mkdir -p repo | ||
flatpak build-update-repo --generate-static-deltas repo | ||
if [ -f "futr.flatpak" ]; then | ||
flatpak build-import-bundle repo futr.flatpak | ||
fi | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Upload Repository | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'repo' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Flatpak Tagged Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
flatpak-build-and-release: | ||
name: Flatpak Build and Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Use the same steps as continuous.yml until the "Update appdata.xml" step | ||
# Copy all previous steps... | ||
|
||
- name: Update appdata.xml for tagged release | ||
run: | | ||
VERSION=${GITHUB_REF#refs/tags/v} | ||
TODAY=$(date +%Y-%m-%d) | ||
# Add new release entry at the top of releases section | ||
sed -i "/<releases>/a \ <release version=\"$VERSION\" date=\"$TODAY\">\n <description>\n <p>Release version $VERSION</p>\n </description>\n </release>" flatpak/com.futrnostr.futr.appdata.xml | ||
- name: Build Flatpak | ||
run: ./build-flatpak.sh | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: "futr.flatpak" | ||
prerelease: false | ||
generate_release_notes: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters