-
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
314 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
10 changes: 10 additions & 0 deletions
10
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.desktop
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,10 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
Name=Decred DEX Client | ||
Comment=Multi-wallet backed by Decred DEX | ||
Categories=Office;Finance; | ||
Icon=org.decred.dcrdex | ||
Exec=dexc | ||
Terminal=false | ||
StartupWMClass=DCRDEX |
30 changes: 30 additions & 0 deletions
30
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.metainfo.xml
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,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop-application"> | ||
<id>org.decred.dcrdex</id> | ||
<launchable type="desktop-id">org.decred.dcrdex.desktop</launchable> | ||
<name>DCRDEX</name> | ||
<summary>Decentralized cryptocurrency exchange</summary> | ||
<metadata_license>MIT</metadata_license> | ||
<project_license>BlueOak-1.0.0</project_license> | ||
<url type="homepage">https://dex.decred.org</url> | ||
<url type="help">https://chat.decred.org/#/room/#dex:decred.org</url> | ||
<developer_name>The Decred Developers</developer_name> | ||
<description> | ||
<p> | ||
Non-custodial peer-to-peer exchange where your funds never leave your wallet. | ||
Trade Bitcoin, USDC, Ethereum, Decred, Dogecoin, Zcash and more without KYC | ||
and fees, using atomic swaps technology. | ||
</p> | ||
</description> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://raw.githubusercontent.com/decred/umbrel-app-store/master/decred-dcrdex/images/screenshot_1.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/decred/umbrel-app-store/master/decred-dcrdex/images/screenshot_2.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/decred/umbrel-app-store/master/decred-dcrdex/images/screenshot_3.png</image> | ||
</screenshot> | ||
</screenshots> | ||
</component> |
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 --always | 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 |
Oops, something went wrong.