Building snap #1906

Closed
g1itch wants to merge 3 commits from snap into v0.6
3 changed files with 91 additions and 2 deletions

53
.github/workflows/snap.yml vendored Normal file
View File

@ -0,0 +1,53 @@
name: Build snap
on:
push:
pull_request:
branches: 'v0.6'
jobs:
build-snap:
runs-on: ubuntu-18.04
steps:
- name: Remove prev tag
if: ${{ github.ref == 'refs/heads/ci' }}
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/continuous"
})
} catch (e) {
console.log("The continuous doesn't exist yet: " + e)
}
- uses: actions/checkout@v2
- name: Install apt dependencies
run: |
sudo apt-get install -yq --no-install-suggests --no-install-recommends \
snapcraft
- name: Build snap
id: snap
run: |
pushd packages; snapcraft; popd
echo "::set-output name=asset_path::packages/*.snap"
- uses: actions/upload-artifact@v2
with:
name: snap
path: ${{ steps.snap.outputs.asset_path }}
- name: Release Continuous
if: ${{ github.ref == 'refs/heads/ci' }}
uses: softprops/action-gh-release@master
with:
prerelease: true
tag_name: continuous
target_commitish: ${{ github.sha }}
files: |
${{ steps.snap.outputs.asset_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,36 @@
name: pybitmessage
version: '0.6.3'
base: core18
grade: devel
confinement: strict
summary: Reference client for Bitmessage, a P2P communications protocol
description: The PyBitmessage
adopt-info: pybitmessage
apps:
pybitmessage:
command: pybitmessage
plugs: [network, network-bind, home, desktop, desktop-legacy, wayland, unity7]
desktop: share/applications/pybitmessage.desktop
environment:
LANG: C.UTF-8
parts:
pybitmessage:
source: https://github.com/g1itch/PyBitmessage.git
source-branch: snap
plugin: python
python-version: python2
build-packages:
- libssl-dev
- python-all-dev
python-packages:
- defusedxml
- jsonrpclib
- qrcode
- stem
stage-packages:
- python-qt4
- python-sip
- sni-qt
parse-info: [setup.py]

View File

@ -9,8 +9,6 @@ from importlib import import_module
from setuptools import setup, Extension from setuptools import setup, Extension
from setuptools.command.install import install from setuptools.command.install import install
from src.version import softwareVersion
EXTRAS_REQUIRE = { EXTRAS_REQUIRE = {
'docs': ['sphinx', 'sphinx_rtd_theme'], 'docs': ['sphinx', 'sphinx_rtd_theme'],
@ -49,6 +47,8 @@ class InstallCmd(install):
if __name__ == "__main__": if __name__ == "__main__":
from src.version import softwareVersion
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f: with open(os.path.join(here, 'README.md')) as f:
README = f.read() README = f.read()