Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
release_tag:
description: "Release tag (example: 1.0.0)"
required: false
type: string

prerelease:
description: "Mark as prerelease"
required: false
default: "false"
type: choice
options:
- "false"
- "true"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

container:
image: archlinux:latest

steps:
- name: Install base dependencies
run: |
pacman -Syu --noconfirm archlinux-keyring
pacman -Syu --noconfirm pkg-config \
base-devel \
sudo \
wget \
patchelf

- name: Create build user
run: |
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

- name: Checkout repository
uses: actions/checkout@v6

- name: Fix permissions
run: chown -R builder:builder .

- name: Build
run: |
sudo -u builder sh <<'EOF'
set -e
cd src/protontricks/data/appimage
makepkg -p PKGBUILD-git -fs --noconfirm
EOF
ls -lh
cd src/protontricks/data/appimage
pacman --noconfirm -U ./*.pkg.tar.zst
chmod +x ./make-appimage.sh
./make-appimage.sh

- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: AppImage
path: "src/protontricks/data/appimage/dist/*.AppImage"
archive: false

- name: Create GitHub Release
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '')
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.event.inputs.release_tag || github.ref_name }}
name: ${{ github.event.inputs.release_tag || github.ref_name }}
files: "src/protontricks/data/appimage/dist/*.AppImage"
generate_release_notes: true
draft: false
prerelease: ${{ github.event.inputs.prerelease == 'true' }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Install appstreamcli
run: sudo apt install appstream
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,14 @@ pip-selfcheck.json


# End of https://www.gitignore.io/api/python,virtualenv

# AppImage
AppDir/

*.tar.zst

quick-sharun*
get-debloated-pkgs*
src/protontricks/data/appimage/protontricks/
src/protontricks/data/appimage/protontricks/src/
src/protontricks/data/appimage/pkg/
62 changes: 62 additions & 0 deletions src/protontricks/data/appimage/PKGBUILD-git
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Kudos to maintainers from official arch repos
# Carl Smedstad <carsme@archlinux.org>
# Jason Stryker <public at jasonstryker dot com>
# Konstantin Liberty <jon9097 at gmail dot com>

pkgname=protontricks
pkgver=1.14.1
pkgrel=1
pkgdesc="Run Winetricks commands for Steam Play/Proton games among other common Wine features"
arch=('any')
url="https://github.com/twig6943/protontricks"
license=('GPL-3.0-only')
depends=(
'python'
'python-pillow'
'python-vdf'
'winetricks'
'openjpeg2'
'libimagequant'
'zenity'
'yad'
)
makedepends=(
'git'
'python-build'
'python-installer'
'python-setuptools'
'python-setuptools-scm'
'python-wheel'
)
checkdepends=('python-pytest')

source=()
b2sums=()

prepare() {
git clone --depth 1 --branch appimage "$url.git" "$pkgname"
}

build() {
cd $pkgname
python -m build --wheel --no-isolation
}

check() {
cd $pkgname
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest
}

package() {
cd $pkgname
install -vDm644 src/protontricks/data/share/icons/hicolor/scalable/apps/com.github.Matoking.protontricks.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/com.github.Matoking.protontricks.svg"
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md

# We already install the desktop entries, not needed
rm -v "$pkgdir/usr/bin/protontricks-desktop-install"
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
rm -vr "$pkgdir/$site_packages/protontricks/data/share"
}
Loading