v0.9.3: Fix too narrow combobox pulldown menus #179
Workflow file for this run
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
--- | |
name: build_flatpak | |
on: | |
push: | |
branches: | |
- main | |
# tags: | |
# - 'v*' # Push a tag (this is not a release!) | |
release: # new version with tag | |
types: [published] | |
pull_request: | |
page_build: | |
workflow_dispatch: | |
jobs: | |
flatpak: | |
name: "Flatpak" | |
runs-on: ubuntu-latest | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-23.08 | |
options: --privileged | |
steps: | |
- name: Infos about github ref and trigger event | |
run: | | |
echo github.event_name: ${{ github.event_name }} | |
echo github.ref: ${{ github.ref }} | |
echo github.ref_type: ${{ github.ref_type }} | |
echo github.ref_name: ${{ github.ref_name }} | |
# Example result for tagged release: | |
# github.event_name: release | |
# github.ref: refs/tags/v0.8.0a3 | |
# github.ref_type: tag | |
# github.ref_name: v0.8.0a3 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Clone flatpak manifest from Flathub | |
uses: GuillaumeFalourd/clone-github-repo-action@v1 | |
with: | |
owner: 'flathub' | |
repository: 'com.github.chipmuenk.pyfda' | |
- name: list | |
run: ls | |
- name: Replace git tag by the commit id on which it runs | |
if: github.ref_type != 'tag' | |
run: > | |
sed -i 's@\&git_tag .*@\&git_tag "${{ github.sha }}"@' com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
- name: Use correct git tag | |
if: github.ref_type == 'tag' | |
run: > | |
sed -i 's@\&git_tag .*@\&git_tag "${{ github.ref_name }}"@' com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
- name: Replace source url | |
run: > | |
sed -i "s@\&git_url .*pyfda.git@\&git_url $GITHUB_SERVER_URL/$GITHUB_REPOSITORY@" com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
- name: Add dev build marker to cmake options | |
if: github.ref_type != 'tag' | |
run: > | |
sed -i 's@config-opts: \["\(.*\)"\]@config-opts: ["\1", "-DDEV_BUILD=${{ github.ref_name }}"]@' com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
- name: Replace desktop file name suffix | |
if: github.ref_type != 'tag' | |
run: > | |
sed -i 's@desktop-file-name-suffix: ""@desktop-file-name-suffix: " (Development)"@' com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
- name: Show Flatpak manifest | |
run: cat com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
- name: Build package | |
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6 | |
with: | |
bundle: com.github.chipmuenk.pyfda.flatpak | |
manifest-path: com.github.chipmuenk.pyfda/com.github.chipmuenk.pyfda.yaml | |
cache: false | |
branch: development | |
# Uploaded /__w/pyfda/pyfda/com.github.chipmuenk.pyfda.flatpak | |
- name: Publish build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: com.github.chipmuenk.pyfda/* | |
name: pyfda_Flatpak | |
Validate_appdata_file: | |
name: Validate appdata file | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: validation | |
# Command copied from flathub build process | |
run: | | |
sudo apt-get update | |
sudo apt install flatpak | |
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
sudo flatpak install -y org.freedesktop.appstream-glib | |
flatpak run --env=G_DEBUG=fatal-criticals org.freedesktop.appstream-glib validate ./ressource/linux/pyfda.appdata.xml | |
release: | |
# https://github.com/marvinpinto/actions/issues/177 | |
needs: [flatpak] | |
runs-on: ubuntu-latest # does not matter which | |
# if: ${{ github.ref == 'refs/heads/main' }} | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
path: artifacts | |
- name: list artifacts folder | |
run: | | |
echo "*** Show artifacts folder: ***" | |
ls artifacts | |
echo "*** Show artifacts/pyfda_Flatpak folder: ***" | |
ls "artifacts/pyfda_Flatpak" | |
# This doesn't work, path / file not found, | |
# only pyfda_Flatpak.zip is downloaded and expanded, not the flatpak file | |
# echo "*** Show artifacts/com.github.chipmuenk.pyfda-x86_64: ***" | |
# ls "artifacts/com.github.chipmuenk.pyfda-x86_64" | |
echo "*** Show com.github.chipmuenk.pyfda-x86_64: ***" | |
ls "com.github.chipmuenk.pyfda-x86_64" | |
# - name: Update GitHub prerelease | |
# if: ${{ github.ref == 'refs/heads/main' }} | |
# uses: marvinpinto/action-automatic-releases@latest | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# automatic_release_tag: latest | |
# prerelease: true | |
# title: "Latest Build" | |
# files: | | |
# **/artifacts/pyfda Flatpak/com.github.chipmuenk.pyfda.yaml | |
# **/com.github.chipmuenk.pyfda-x86_64/*.flatpak | |
- name: Update GitHub prerelease | |
if: success() && github.ref_type != 'tag' | |
uses: pyTooling/Actions/releaser@main | |
with: | |
tag: latest | |
rm: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
artifacts/pyfda_Flatpak/com.github.chipmuenk.pyfda.yaml | |
artifacts/com.github.chipmuenk.pyfda-x86_64/*.flatpak | |
- name: Update versioned Github release | |
if: success() && github.ref_type == 'tag' | |
uses: pyTooling/Actions/releaser@main | |
with: | |
tag: ${{ github.ref_name }} | |
rm: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
artifacts/pyfda_Flatpak/com.github.chipmuenk.pyfda.yaml | |
artifacts/com.github.chipmuenk.pyfda-x86_64/*.flatpak | |
... |