Make 'Publish Release' action publish both the AppImage and binary #124
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: CI - Ubuntu | |
on: | |
push: | |
branches: | |
- "master" | |
tags: | |
- "v[0-9]+\\.[0-9]+\\.[0-9]+" | |
pull_request: | |
jobs: | |
ci: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: "6.8.0" | |
archives: icu qtbase qtsvg qttools | |
cache: true | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=RELEASE -DTEST=ON | |
- name: Build PokeFinder | |
run: cmake --build ${{github.workspace}}/build --config RELEASE | |
- name: Test PokeFinder | |
run: ctest --test-dir ${{github.workspace}}/build -V | |
- name: Fetch AppImage tools | |
run: | | |
sudo apt install appstream | |
sudo apt install libfuse2 | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
chmod a+x linuxdeploy-*.AppImage | |
- name: Build AppImage | |
run: | | |
export QMAKE=$QT_ROOT_DIR/bin/qmake | |
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt \ | |
-e build/Source/PokeFinder \ | |
-d Source/Form/io.github.admiral_fish.pokefinder.desktop \ | |
-i Source/Form/Images/Icon/pokefinder_16x16.png \ | |
-i Source/Form/Images/Icon/pokefinder_24x24.png \ | |
-i Source/Form/Images/Icon/pokefinder_32x32.png \ | |
-i Source/Form/Images/Icon/pokefinder_48x48.png \ | |
-i Source/Form/Images/Icon/pokefinder_256x256.png \ | |
--icon-filename io.github.admiral_fish.pokefinder | |
mkdir AppDir/usr/share/metainfo | |
cp Source/Form/io.github.admiral_fish.pokefinder.appdata.xml AppDir/usr/share/metainfo/ | |
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage | |
mv PokéFinder-x86_64.AppImage PokeFinder-x86_64.AppImage | |
- name: Package PokeFinder | |
run: | | |
tar czf PokeFinder-linux.tar.gz -C ./build/Source/ PokeFinder | |
tar czf PokeFinder-linux-AppImage.tar.gz PokeFinder-x86_64.AppImage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: PokeFinder-linux | |
path: ./build/Source/PokeFinder | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: PokeFinder-linux-AppImage | |
path: PokeFinder-x86_64.AppImage | |
- name: Publish Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
PokeFinder-linux.tar.gz | |
PokeFinder-linux-AppImage.tar.gz |