174 lines
5.7 KiB
YAML
174 lines
5.7 KiB
YAML
|
|
name: "Release Tests"
|
|
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
deb-package:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Makedeb
|
|
run: |
|
|
wget -qO - 'https://proget.hunterwittenborn.com/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg &> /dev/null
|
|
echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.hunterwittenborn.com/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list
|
|
sudo apt update
|
|
sudo apt install makedeb
|
|
- name: prepare source directory
|
|
run: |
|
|
git clone https://mpr.hunterwittenborn.com/rare.git build
|
|
sed -i 's/source=.*/source=("rare-test::git+$url")/g' build/PKGBUILD
|
|
sed -i "s/\$pkgver/test/g" build/PKGBUILD
|
|
|
|
- name: build deb
|
|
run: |
|
|
cd build
|
|
makedeb -d
|
|
mv *.deb Rare.deb
|
|
|
|
- name: Upload to Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Rare.deb
|
|
path: build/Rare.deb
|
|
|
|
appimage:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- name: install Deps
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install python3 python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse
|
|
- name: install appimage-builder
|
|
run: |
|
|
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
|
|
sudo chmod +x /usr/local/bin/appimagetool
|
|
sudo pip3 install appimage-builder
|
|
- name: Build Appimage
|
|
run: |
|
|
cp rare/__main__.py .
|
|
appimage-builder --skip-test
|
|
mv Rare-*.AppImage Rare.AppImage
|
|
|
|
- name: Upload to Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Rare.AppImage
|
|
path: Rare.AppImage
|
|
|
|
nuitka:
|
|
runs-on: "windows-latest"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Install build dependencies
|
|
run: pip3 install nuitka ordered-set
|
|
- name: Install target dependencies
|
|
run: |
|
|
pip3 install -r requirements.txt
|
|
pip3 install -r requirements-presence.txt
|
|
- name: Version
|
|
id: version
|
|
run: |
|
|
git fetch --prune --unshallow
|
|
echo "::set-output name=tag_offset::$(git describe --long --tags)"
|
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
- name: Build
|
|
run: >-
|
|
python -m nuitka
|
|
--assume-yes-for-downloads
|
|
--follow-imports --prefer-source-code --mingw64 --lto=no --jobs=2 --static-libpython=no --standalone
|
|
--enable-plugin=anti-bloat --enable-plugin=pyqt5 --show-anti-bloat-changes --nofollow-import-to="*.tests"
|
|
--nofollow-import-to="*.distutils" --include-package-data=qtawesome
|
|
--include-data-dir=rare\resources\images=rare\resources\images
|
|
--include-data-files=rare\resources\languages=rare\resources\languages="*.qm"
|
|
--windows-icon-from-ico=rare\resources\images\Rare.ico
|
|
--windows-company-name=Rare --windows-product-name=Rare --windows-file-description=rare.exe
|
|
--windows-file-version=0.0.0.0
|
|
--windows-product-version=0.0.0.0
|
|
--windows-disable-console
|
|
rare
|
|
|
|
- name: Upload to Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Rare-Windows-${{ steps.version.outputs.tag_offset }}
|
|
path: rare.dist
|
|
|
|
cx_freeze:
|
|
runs-on: "windows-latest"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Install Build Dependencies
|
|
run: pip3 install --upgrade cx_freeze wheel
|
|
- name: Install Target Dependencies
|
|
run: |
|
|
pip3 install -r requirements.txt
|
|
pip3 install -r requirements-presence.txt
|
|
- name: Version
|
|
id: version
|
|
run: |
|
|
git fetch --prune --unshallow
|
|
echo "::set-output name=tag_offset::$(git describe --long --tags)"
|
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
- name: Build
|
|
run: |
|
|
python freeze.py bdist_msi
|
|
mv dist/*.msi dist/Rare-Windows.msi
|
|
|
|
- name: Upload to Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Rare-Windows-${{ steps.version.outputs.tag_offset }}.msi
|
|
path: dist/*.msi
|
|
|
|
mac_os:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
- name: Pip Dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: copy files
|
|
run: mv rare/__main__.py __main__.py
|
|
|
|
- name: run pyinstaller
|
|
run: >-
|
|
pyinstaller -F --name Rare
|
|
--add-data "rare/resources/languages/*:rare/resources/languages"
|
|
--add-data "rare/resources/images/*:rare/resources/images/"
|
|
--windowed --icon rare/resources/images/Rare.icns
|
|
--hidden-import=legendary __main__.py
|
|
|
|
- name: create dmg
|
|
run: |
|
|
git clone https://github.com/create-dmg/create-dmg
|
|
create-dmg/create-dmg Rare-${{github.ref}}.dmg dist/Rare.App --volname Rare --volicon rare/resources/images/Rare.icns
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Rare-MacOS.dmg
|
|
path: ./*.dmg
|