-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
293 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
## Build and Publish Snap Package workflow | ||
|
||
This workflow builds a `snap` package and uploads it to the [Snap Store](https://snapcraft.io/store). It has a `workflow_dispatch` trigger so it can be triggered manually only, it is not hooked up to any other GH event. | ||
|
||
The store upload requires the `SNAPCRAFT_STORE_CREDENTIALS` variable to be set in [Github Secrets](https://github.com/decred/dcrdex/settings/secrets/actions). | ||
See https://github.com/snapcore/action-publish for details. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and Publish Snap Package | ||
|
||
on: | ||
# manually trigger the workflow from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-snap: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Compile frontend | ||
working-directory: client/webserver/site | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Install deb deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libgtk-3-dev libwebkit2gtk-4.0-dev build-essential | ||
- name: Build deb package | ||
working-directory: client/cmd/dexc-desktop | ||
run: pkg/pkg-debian.sh | ||
|
||
- name: Prepare snapcraft.yml | ||
working-directory: client/cmd/dexc-desktop | ||
run: pkg/prepare-snap.sh | ||
|
||
- name: Build snap package | ||
uses: snapcore/action-build@2ee46bc29d163c9c836f2820cc46b39664bf0de2 # v1.1.3 | ||
id: build | ||
with: | ||
path: client/cmd/dexc-desktop | ||
|
||
- name: Publish snap to Snap Store | ||
uses: snapcore/action-publish@0a8d537ae06f4a292e8b4ef1084cd5631b3c6871 # v1.1.1 | ||
env: | ||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | ||
with: | ||
snap: ${{ steps.build.outputs.snap }} | ||
release: stable |
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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# This file defines common variables to be source'd by the various build scripts | ||
# in this directory. | ||
|
||
# pick up the release tag from git | ||
VER=$(git describe --tags --abbrev=0 | sed -e 's/^v//') | ||
META= # "release" | ||
REV="0" | ||
|
||
APP="dexc" | ||
ARCH="amd64" | ||
|
||
# The build directory will be deleted at the beginning of every build. The | ||
# directory is .gitignore'd. | ||
BUILD_DIR="./build" | ||
|
||
# DEB_NAME follows the prescribed format for debian packaging. | ||
DEB_NAME="${APP}_${VER}-${REV}_${ARCH}" | ||
|
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
|
||
source $SCRIPT_DIR/common.sh | ||
|
||
SNAPCRAFT_YML_IN=snap/local/snapcraft.yaml.in | ||
SNAPCRAFT_YML=snap/snapcraft.yaml | ||
sed -e "s/\$VERSION/$VER/g" \ | ||
-e "s/\$DEB_NAME/$DEB_NAME/g" "$SNAPCRAFT_YML_IN" > "$SNAPCRAFT_YML" | ||
|
||
snapcraft --verbose --output $BUILD_DIR/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
source $(dirname "$0")/common.sh | ||
|
||
snapcraft login | ||
|
||
snapcraft upload --release=stable $BUILD_DIR/${APP}_${VER}_${ARCH}.snap |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: dexc | ||
adopt-info: metainfo | ||
version: '$VERSION' | ||
license: BlueOak-1.0.0 | ||
|
||
base: core22 | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
compression: lzo | ||
|
||
plugs: | ||
dbus-svc: | ||
bus: system | ||
interface: dbus | ||
name: org.freedesktop.portal | ||
dbus-dbusmenu: | ||
bus: session | ||
interface: dbus | ||
name: org.kde.StatusNotifierWatcher | ||
|
||
apps: | ||
dexc: | ||
common-id: org.decred.dcrdex | ||
command: usr/bin/dexc | ||
desktop: usr/share/applications/dexc.desktop | ||
extensions: [gnome] | ||
environment: | ||
GTK_USE_PORTAL: "1" | ||
#TMPDIR: $XDG_RUNTIME_DIR | ||
#XDG_CURRENT_DESKTOP: Unity | ||
#DISABLE_WAYLAND: 1 | ||
plugs: | ||
- home | ||
- opengl | ||
- x11 | ||
- desktop | ||
- desktop-legacy | ||
- network | ||
- network-status | ||
- browser-support | ||
- screen-inhibit-control | ||
- dbus-svc | ||
- dbus-dbusmenu | ||
|
||
parts: | ||
metainfo: | ||
plugin: nil | ||
source: . | ||
parse-info: [./src/org.decred.dcrdex.metainfo.xml] | ||
|
||
dexc-desktop: | ||
plugin: dump | ||
source: ./build/$DEB_NAME.deb | ||
source-type: deb | ||
prime: | ||
- -usr/lib/x86_64-linux-gnu/libEGL_mesa* | ||
- -usr/lib/x86_64-linux-gnu/libGLX_mesa* | ||
- -usr/lib/x86_64-linux-gnu/libGLESv2* | ||
- -usr/lib/x86_64-linux-gnu/libcaca++* | ||
- -usr/lib/x86_64-linux-gnu/libcolordprivate* | ||
- -usr/lib/x86_64-linux-gnu/libdconf* | ||
- -usr/lib/x86_64-linux-gnu/libexslt* | ||
- -usr/lib/x86_64-linux-gnu/libgstcheck-1.0* | ||
- -usr/lib/x86_64-linux-gnu/libgstcontroller-1.0* | ||
- -usr/lib/x86_64-linux-gnu/libicuio* | ||
- -usr/lib/x86_64-linux-gnu/libicutest* | ||
- -usr/lib/x86_64-linux-gnu/libjacknet* | ||
- -usr/lib/x86_64-linux-gnu/libjackserver* | ||
- -usr/lib/x86_64-linux-gnu/liborc-test-0.4* | ||
- -usr/lib/x86_64-linux-gnu/libpulse-simple* | ||
- -usr/lib/x86_64-linux-gnu/libunwind-coredump* | ||
- -usr/lib/x86_64-linux-gnu/libunwind-ptrace* | ||
- -usr/lib/x86_64-linux-gnu/libunwind-x86_64* | ||
- -usr/lib/x86_64-linux-gnu/libwoff2enc* | ||
- -usr/lib/x86_64-linux-gnu/libicutu* | ||
- -usr/lib/x86_64-linux-gnu/libsamplerate* | ||
- -usr/lib/x86_64-linux-gnu/libxcb-dri2* | ||
- -usr/lib/x86_64-linux-gnu/libxcb-glx* | ||
- -usr/lib/x86_64-linux-gnu/libxcb-present* | ||
- -usr/lib/x86_64-linux-gnu/libxcb-randr* | ||
- -usr/lib/x86_64-linux-gnu/libxcb-sync* | ||
- -usr/lib/x86_64-linux-gnu/libxcb-xfixes* | ||
- -usr/lib/x86_64-linux-gnu/libxshmfence* | ||
|
||
stage-packages: | ||
- desktop-file-utils | ||
- libwebkit2gtk-4.0-37 | ||
- libgtk-3-0 | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.