Update firmware to 1.0.0-beta3 #96
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
# This workflow builds the AYAB release packages | |
# for Windows, Mac OSX, and Ubuntu/Debian Linux. | |
# | |
# The build starts when a version tag is pushed. | |
# Release assets are also uploaded as workflow | |
# artifacts, so that they are still available | |
# for test releases after the release and its | |
# tag have been deleted. | |
# | |
# Script adapted from https://github.com/trappitsch/fbs-release-github-actions | |
# | |
# @author Tom Price | |
# @date July 2020 | |
name: Build | |
on: | |
push: | |
tags: | |
- "v?[0-9]+.[0-9]+.[0-9]+-?[a-zA-Z0-9]*" | |
jobs: | |
setup: | |
name: Create cache | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: [3.11.9] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: ./.github/actions/init-environment | |
id: vars | |
- name: Get firmware version matching manifest | |
run: | | |
echo ${{ steps.vars.outputs.manifest }} | |
available=$(curl -s https://github.com/AllYarnsAreBeautiful/ayab-firmware/releases | grep -oE '/tag/[^\"]+' | sed -E 's/\/tag\///') | |
echo $available | |
match=$(for x in $available; do echo $x; done | grep ^${{ steps.vars.outputs.manifest }} | sort -r | head -1) | |
echo $match | |
if [[ $match ]] | |
then | |
cd src/main/resources/base/ayab/firmware/ | |
wget https://github.com/AllYarnsAreBeautiful/ayab-firmware/releases/download/$match/ayab_monolithic_uno.hex | |
else | |
echo "Error: could not find firmware release matching manifest" | |
exit 1 | |
fi | |
- name: Cache firmware | |
uses: actions/cache/save@v4 | |
with: | |
path: src/main/resources/base/ayab/firmware/*.hex | |
key: firmware-${{ steps.vars.outputs.manifest }} | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install -y avrdude libasound2-dev | |
- name: Install Python modules | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install -r requirements.build.txt | |
- name: Use cached gui files (1) | |
id: gui1-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/*_gui.py | |
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }} | |
- name: Use cached gui files (2) | |
id: gui2-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_gui.py | |
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }} | |
- name: Use cached logo | |
id: logo-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/ayab_logo_rc.py | |
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }} | |
- name: Use cached graphics | |
id: e-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_rc.py | |
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }} | |
- name: Use cached translation files | |
id: qm-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/translations/*.qm | |
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }} | |
- name: Use cached `base.json` file | |
id: base-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/build/settings/base.json | |
key: base-${{ steps.vars.outputs.tag }} | |
- name: Convert UI and translation files | |
if: ${{ (steps.gui1-cache.outputs.cache-hit != 'true') || | |
(steps.gui2-cache.outputs.cache-hit != 'true') || | |
(steps.logo-cache.outputs.cache-hit != 'true') || | |
(steps.e-cache.outputs.cache-hit != 'true') || | |
(steps.qm-cache.outputs.cache-hit != 'true') }} | |
run: | | |
# Install qt6 packages to bring in system dependencies only | |
sudo apt install -y qt6-base-dev qt6-tools-dev-tools | |
bash setup-environment.ps1 | |
- name: Cache gui files (1) | |
if: ${{ (steps.gui1-cache.outputs.cache-hit != 'true') }} | |
uses: actions/cache/save@v4 | |
with: | |
path: src/main/python/main/ayab/*_gui.py | |
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }} | |
- name: Cache gui files (2) | |
if: ${{ (steps.gui2-cache.outputs.cache-hit != 'true') }} | |
uses: actions/cache/save@v4 | |
with: | |
path: src/main/python/main/ayab/*_gui.py | |
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }} | |
- name: Cache logo | |
if: ${{ (steps.logo-cache.outputs.cache-hit != 'true') }} | |
uses: actions/cache/save@v4 | |
with: | |
path: src/main/python/main/ayab/ayab_logo_rc.py | |
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }} | |
- name: Cache graphics | |
if: ${{ (steps.e-cache.outputs.cache-hit != 'true') }} | |
uses: actions/cache/save@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_rc.py | |
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }} | |
- name: Cache translation files | |
if: ${{ (steps.qm-cache.outputs.cache-hit != 'true') }} | |
uses: actions/cache/save@v4 | |
with: | |
path: src/main/resources/base/ayab/translations/*.qm | |
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }} | |
- name: Cache `base.json` file | |
if: ${{ (steps.base-cache.outputs.cache-hit != 'true') }} | |
uses: actions/cache/save@v4 | |
with: | |
path: src/build/settings/base.json | |
key: base-${{ steps.vars.outputs.tag }} | |
deploy: | |
name: Create and deploy source code documentation | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies for doxygen | |
run: | | |
sudo apt-get install doxygen graphviz -y | |
- name: Create .nojekyll so that filenames with underscores work on Github Pages | |
run: | | |
mkdir -p docs/html | |
touch docs/html/.nojekyll | |
- name: Deploy to pages | |
uses: DenverCoder1/doxygen-github-pages-action@v1.3.1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: docs/html | |
config_file: Doxyfile | |
build-windows: | |
name: Create and upload Windows release | |
needs: setup | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [3.11.9] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: ./.github/actions/init-environment | |
id: vars | |
- name: Install dependencies | |
shell: pwsh | |
run: | | |
choco install patch | |
choco install vcredist-all # fixes dependency on msvcr100.dll | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install -r requirements.build.txt | |
python -m pip install -r windows-build\windows_build_requirements.txt | |
- name: Restore cached firmware | |
id: firmware-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/firmware/*.hex | |
key: firmware-${{ steps.vars.outputs.manifest }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Restore cached gui files (1) | |
id: gui1-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/*_gui.py | |
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Restore cached gui files (2) | |
id: gui2-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_gui.py | |
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Restore cached logo | |
id: logo-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/ayab_logo_rc.py | |
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Restore cached graphics | |
id: e-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_rc.py | |
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Restore cached translation files | |
id: qm-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/translations/*.qm | |
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Restore cached `base.json` file | |
id: base-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/build/settings/base.json | |
key: base-${{ steps.vars.outputs.tag }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Remove unneeded files | |
shell: bash | |
run: | | |
rm src/main/python/main/ayab/*_gui.ui | |
rm src/main/python/main/ayab/ayab_logo_rc.qrc | |
- name: Change line endings to CRLF | |
shell: bash | |
run: | | |
for f in $(ls /main/python/main/ayab/*_gui.py) | |
do | |
unix2dos $f | |
done | |
for f in $(ls /main/python/main/ayab/engine/*_gui.py) | |
do | |
unix2dos $f | |
done | |
- name: Check cached files | |
shell: bash | |
run: | | |
pwd | |
ls -l src/main/python/main/ayab/ | |
ls -l src/main/resources/base/ayab/translations/ | |
# The OpenSSL-based backend for QtNetwork requires the OpenSSL dynamic | |
# libraries but they are not packaged with Qt or PySide. Pyinstaller | |
# tries to find them for us and make them available, but does not | |
# always succeed, see https://github.com/pyinstaller/pyinstaller/issues/8857 | |
# What we can do instead is disable the OpenSSL backend by deleting the | |
# relevant plugin — this way, Pyinstaller won't package OpenSSL DLLs, | |
# and Qt will silently fall back to the `schannel` backend that uses | |
# native Windows libraries. Note that deleting the plugin is an approach | |
# that is actually suggested in the Qt documentation, see | |
# https://doc.qt.io/qt-6/ssl.html#considerations-while-packaging-your-application | |
- name: Remove OpenSSL QtNetwork backend | |
shell: bash | |
run: | | |
find "$(python -c 'import PySide6;print(PySide6.__path__[0])')" -iname qopensslbackend.dll -delete | |
- name: Build app | |
shell: pwsh | |
run: python -m fbs freeze | |
- name: Create installer | |
shell: pwsh | |
run: | | |
python -m fbs installer | |
Move-Item -Path target\AYABSetup.exe -Destination target\AYAB-${{ steps.vars.outputs.tag }}.exe | |
- name: Upload asset | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.vars.outputs.tag }} | |
commit: ${{ steps.vars.outputs.sha }} | |
body: "" # release message, alternative to body_path | |
# body_path: release_text.md # uncomment if not used | |
draft: ${{ steps.vars.outputs.draft }} | |
prerelease: false | |
allowUpdates: true | |
artifacts: target/AYAB-${{ steps.vars.outputs.tag }}.exe | |
artifactContentType: application/exe | |
replacesArtifacts: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: AYAB-${{ steps.vars.outputs.tag }}.exe | |
path: target/AYAB-${{ steps.vars.outputs.tag }}.exe | |
build-macos: | |
name: Create and upload Mac OSX release | |
needs: setup | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
python-version: [3.11.9] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: ./.github/actions/init-environment | |
id: vars | |
- name: Install dependencies | |
run: | | |
brew install avrdude | |
mkdir tmp-wheel/ | |
python -m pip install delocate==0.11.0 | |
# Find platform values on e.g. https://pypi.org/project/numpy/1.26.4/#files | |
python -m pip download --only-binary=:all: --platform macosx_10_09_x86_64 "$(grep numpy requirements.build.txt)" | |
python -m pip download --only-binary=:all: --platform macosx_11_0_arm64 "$(grep numpy requirements.build.txt)" | |
delocate-fuse numpy*arm* numpy*x86* -w tmp-wheel/ | |
python -m pip download --only-binary=:all: --platform macosx_10_10_x86_64 "$(grep Pillow requirements.build.txt)" | |
python -m pip download --only-binary=:all: --platform macosx_11_0_arm64 "$(grep Pillow requirements.build.txt)" | |
delocate-fuse Pillow*arm* Pillow*x86* -w tmp-wheel/ | |
python -m pip download --only-binary=:all: --platform=macosx_10_9_universal2 "$(grep bitarray requirements.build.txt)" | |
python -m pip install tmp-wheel/*.whl bitarray*.whl | |
python -m pip install --no-binary charset_normalizer -r requirements.build.txt | |
- name: Restore cached firmware | |
id: firmware-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/firmware/*.hex | |
key: firmware-${{ steps.vars.outputs.manifest }} | |
fail-on-cache-miss: true | |
- name: Restore cached gui files (1) | |
id: gui1-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/*_gui.py | |
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }} | |
fail-on-cache-miss: true | |
- name: Restore cached gui files (2) | |
id: gui2-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_gui.py | |
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }} | |
fail-on-cache-miss: true | |
- name: Restore cached logo | |
id: logo-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/ayab_logo_rc.py | |
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }} | |
fail-on-cache-miss: true | |
- name: Restore cached graphics | |
id: e-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_rc.py | |
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }} | |
fail-on-cache-miss: true | |
- name: Restore cached translation files | |
id: qm-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/translations/*.qm | |
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }} | |
fail-on-cache-miss: true | |
- name: Restore cached `base.json` file | |
id: base-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/build/settings/base.json | |
key: base-${{ steps.vars.outputs.tag }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Remove unneeded files | |
run: | | |
rm src/main/python/main/ayab/*_gui.ui | |
rm src/main/python/main/ayab/ayab_logo_rc.qrc | |
- name: Check cached files | |
run: | | |
pwd | |
ls -l src/main/python/main/ayab/ | |
ls -l src/main/resources/base/ayab/translations/ | |
- name: Build app | |
run: | | |
python -m fbs freeze | |
codesign -s - --force --all-architectures --timestamp --deep ./target/AYAB-mac.app | |
- name: Create installer | |
run: | | |
python -m fbs installer | |
codesign -s - --force --all-architectures --timestamp --deep ./target/AYAB.dmg | |
mv target/AYAB.dmg target/AYAB-${{ steps.vars.outputs.tag }}.dmg | |
- name: Upload asset | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.vars.outputs.tag }} | |
commit: ${{ steps.vars.outputs.sha }} | |
body: "" # release message, alternative to body_path | |
# body_path: release_text.md # uncomment if not used | |
draft: ${{ steps.vars.outputs.draft }} | |
prerelease: false | |
allowUpdates: true | |
artifacts: target/AYAB-${{ steps.vars.outputs.tag }}.dmg | |
artifactContentType: application/dmg | |
replacesArtifacts: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: AYAB-${{ steps.vars.outputs.tag }}.dmg | |
path: target/AYAB-${{ steps.vars.outputs.tag }}.dmg | |
# see https://github.com/AppImage/AppImageKit/wiki/Bundling-Python-apps | |
build-appimage: | |
name: Create and upload Linux AppImage release | |
needs: setup | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
# Using Python 3.11.10 specifically for Linux builds due to python-appimage availability | |
python-version: [3.11.10] | |
steps: | |
- name: Checkout repo into AppDir | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- uses: ./.github/actions/init-environment | |
id: vars | |
- name: Relocate | |
run: | | |
mkdir git | |
shopt -s extglob dotglob | |
cp -r !(git) git | |
shopt -u dotglob | |
- name: Download AppImage of Python designed for manylinux | |
run: wget -c https://github.com/niess/python-appimage/releases/download/python${{steps.vars.outputs.python-minor}}/${{steps.vars.outputs.python-appimage}} | |
- name: Extract the AppImage | |
run: | | |
chmod +x ${{steps.vars.outputs.python-appimage}} | |
./${{steps.vars.outputs.python-appimage}} --appimage-extract | |
- name: Move repo | |
run: mv git/* squashfs-root | |
- name: Install dependencies | |
run: | | |
cd squashfs-root | |
sudo apt-get install -y avrdude libasound2-dev | |
./AppRun -m pip install --upgrade pip | |
./AppRun -m pip install --upgrade setuptools | |
# hack to fix setup.py script with faulty include | |
./AppRun -m pip install --global-option=build_ext --global-option="-I$(pwd)/opt/${{steps.vars.outputs.python-minor}}/include/${{steps.vars.outputs.python-minor}}" simpleaudio | |
./AppRun -m pip install -r requirements.build.txt | |
- name: Add AppDir subdirectories to PATH | |
run: | | |
echo "usr/bin" >> $GITHUB_PATH | |
echo "opt/${{steps.vars.outputs.python-minor}}/bin" >> $GITHUB_PATH | |
- name: Restore cached firmware | |
id: firmware-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/firmware/*.hex | |
key: firmware-${{ steps.vars.outputs.manifest }} | |
fail-on-cache-miss: true | |
- name: Restore cached gui files (1) | |
id: gui1-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/*_gui.py | |
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }} | |
fail-on-cache-miss: true | |
- name: Restore cached gui files (2) | |
id: gui2-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_gui.py | |
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }} | |
fail-on-cache-miss: true | |
- name: Restore cached logo | |
id: logo-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/ayab_logo_rc.py | |
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }} | |
fail-on-cache-miss: true | |
- name: Restore cached graphics | |
id: e-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/python/main/ayab/engine/*_rc.py | |
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }} | |
fail-on-cache-miss: true | |
- name: Restore cached translation files | |
id: qm-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/main/resources/base/ayab/translations/*.qm | |
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }} | |
fail-on-cache-miss: true | |
- name: Restore cached `base.json` file | |
id: base-cache | |
uses: actions/cache@v4 | |
with: | |
path: src/build/settings/base.json | |
key: base-${{ steps.vars.outputs.tag }} | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- name: Move cached files | |
run: | | |
mv src/main/resources/base/ayab/firmware/*.hex squashfs-root/src/main/resources/base/ayab/firmware/ | |
mv src/main/python/main/ayab/*_gui.py squashfs-root/src/main/python/main/ayab/ | |
mv src/main/python/main/ayab/engine/*_gui.py squashfs-root/src/main/python/main/ayab/engine/ | |
mv src/main/python/main/ayab/ayab_logo_rc.py squashfs-root/src/main/python/main/ayab/ | |
mv src/main/python/main/ayab/engine/lowercase_e_rc.py squashfs-root/src/main/python/main/ayab/engine | |
mv src/main/python/main/ayab/engine/lowercase_e_reversed_rc.py squashfs-root/src/main/python/main/ayab/engine | |
mv src/main/resources/base/ayab/translations/*.qm squashfs-root/src/main/resources/base/ayab/translations/ | |
mv src/build/settings/base.json squashfs-root/src/build/settings/base.json | |
- name: Remove unneeded files | |
run: | | |
rm squashfs-root/src/main/python/main/ayab/*_gui.ui | |
rm squashfs-root/src/main/python/main/ayab/ayab_logo_rc.qrc | |
rm squashfs-root/src/main/python/main/ayab/engine/lowercase_e_rc.qrc | |
rm squashfs-root/src/main/python/main/ayab/engine/lowercase_e_reversed_rc.qrc | |
- name: Check cached files | |
run: | | |
pwd | |
ls -l squashfs-root/src/main/python/main/ayab/ | |
ls -l squashfs-root/src/main/resources/base/ayab/translations/ | |
- name: Replace AppRun | |
run: | | |
cd squashfs-root | |
rm AppRun | |
cp linux-build/appimage/AppRun . | |
- name: Add icon | |
run: | | |
cd squashfs-root | |
rm -f *.png | |
rm -rf usr/share/icons/ | |
cp linux-build/appimage/ayab.png ayab.png | |
mkdir -p usr/share/icons/hicolor/128x128/apps/ | |
cp ayab.png usr/share/icons/hicolor/128x128/apps/ | |
- name: Create desktop file | |
run: | | |
cd squashfs-root | |
rm -f python*.desktop | |
mkdir -p usr/share/applications/ | |
rm -f usr/share/applications/*.desktop | |
cp linux-build/appimage/com.ayab_knitting.ayab.desktop com.ayab_knitting.ayab.desktop | |
cp com.ayab_knitting.ayab.desktop usr/share/applications/com.ayab_knitting.ayab.desktop | |
- name: Add metadata | |
run: | | |
cd squashfs-root | |
mkdir -p usr/share/metainfo/ | |
rm -f usr/share/metainfo/*.appdata.xml | |
cp linux-build/appimage/ayab.appdata.xml usr/share/metainfo/ | |
- name: Convert to AppImage | |
run: | | |
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep appimagetool-.*-x86_64.AppImage | head -n 1 | cut -d '"' -f 2) | |
chmod +x appimagetool-*-x86_64.AppImage | |
chmod 755 squashfs-root | |
sudo apt install appstream | |
VERSION=${{steps.vars.outputs.tag}} ./appimagetool-*-x86_64.AppImage squashfs-root/ | |
sudo apt remove appstream | |
mv ayab-${{ steps.vars.outputs.tag }}-x86_64.AppImage AYAB-${{ steps.vars.outputs.tag }}-x86_64.AppImage | |
- name: Upload asset | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.vars.outputs.tag }} | |
commit: ${{ steps.vars.outputs.sha }} | |
body: "" # release message, alternative to body_path | |
# body_path: release_text.md # uncomment if not used | |
draft: ${{ steps.vars.outputs.draft }} | |
prerelease: false | |
allowUpdates: true | |
artifacts: AYAB-${{ steps.vars.outputs.tag }}-x86_64.AppImage | |
artifactContentType: application/AppImage | |
replacesArtifacts: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: AYAB-${{ steps.vars.outputs.tag }}-x86_64.AppImage | |
path: AYAB-${{ steps.vars.outputs.tag }}-x86_64.AppImage |