diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 0cddc4d1..092bf676 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -14,9 +14,18 @@ jobs: sudo snap install --classic snapcraft snapcraft --destructive-mode + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: guiscrcpy-snap + path: '*.snap' + + - name: Publish to Snap Store run: | echo "${{ secrets.SNAP_DEPLOY_TOKEN }}" > token.txt + mkdir -p ~/.snapcraft + cat token.txt | base64 --decode --ignore-garbage > ~/.snapcraft/snapcraft.cfg # if: github.ref == 'refs/heads/master' snapcraft upload --release=edge *.snap diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index ffb66351..de4bc9f5 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -37,9 +37,7 @@ apps: command-chain: &command-chain-common - bin/debian-multiarch-triplet-provider-launch - bin/classic-launch - - bin/desktop-launch - bin/guiscrcpy - desktop: share/applications/guiscrcpy.desktop parts: @@ -61,12 +59,13 @@ parts: after: [classic-launch, debian-multiarch-triplet-provider-launch] # See 'snapcraft plugins' build-packages: - - python3-build + - python3-pip override-build: | - python -m build . - tar -xvf dist/*.tar.gz setup.py - rm -rf dist - snapcraftctl build + python -m venv $SNAPCRAFT_PART_INSTALL + source $SNAPCRAFT_PART_INSTALL/bin/activate + pip install poetry + python -m poetry install -E PySide2 --no-dev + ls -al $SNAPCRAFT_PART_INSTALL plugin: python source: .