-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: package ignite for flatpak and snap (#3786)
- Loading branch information
1 parent
2a4e3a7
commit 5569bf2
Showing
10 changed files
with
231 additions
and
3 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
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,35 @@ | ||
name: Publish snap package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish-snap: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build snap package | ||
uses: snapcore/action-build@v1 | ||
id: build-snap | ||
|
||
- name: Publish snap package | ||
uses: snapcore/action-publish@v1 | ||
with: | ||
store_login: ${{ secrets.SNAPCRAFT_LOGIN }} | ||
snap: ${{ steps.build-snap.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.flatpak-builder | ||
build-dir | ||
repo | ||
*.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,45 @@ | ||
# Packaging and Distributing Ignite | ||
|
||
Ignite CLI is distributed on multiple platforms and package managers. This document describes how to package and distribute Ignite CLI. | ||
|
||
## Flatpak | ||
|
||
Read the folowing resources to understand Flatpak. | ||
|
||
* <https://docs.flathub.org/docs/category/for-app-authors> | ||
* <https://docs.flatpak.org/en/latest/first-build.html> | ||
|
||
```bash | ||
cd packaging/flatpak | ||
sudo apt install flatpak-builder | ||
flatpak install org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08 org.freedesktop.Sdk.Extension.golang//23.08 | ||
flatpak-builder build-dir com.ignite.Ignite.yml --force-clean | ||
flatpak-builder --user --install--force-clean --repo=repo build-dir com.ignite.Ignite.yml | ||
flatpak run com.ignite.Ignite | ||
``` | ||
|
||
The Flatpak is published at <https://flathub.org/apps/com.ignite.Ignite>. | ||
The update process is done manually at <https://github.com/flathub/com.ignite.Ignite> at the moment. At each release, edit `com.ignite.Ignite.yml` and the metainfo file to update the version. | ||
|
||
## Snap | ||
|
||
Read the folowing resources to understand Snap. | ||
|
||
* <https://snapcraft.io/docs/snapcraft-overview> | ||
* <https://snapcraft.io/docs/go-plugin#heading--core22> | ||
* <https://snapcraft.io/docs/go-applications> | ||
|
||
```bash | ||
cd packaging/snap | ||
sudo apt install snapd | ||
sudo snap install multipass | ||
multipass launch | ||
SNAPCRAFT_BUILD_ENVIRONMENT=multipass snapcraft | ||
snap install ignite_0.0.0_amd64.snap --dangerous --classic | ||
``` | ||
|
||
A [github action](../.github/workflows/release-binary.yml) is used to build and publish the Snap at each release. | ||
|
||
## HomeBrew | ||
|
||
TBD. |
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,33 @@ | ||
app-id: com.ignite.Ignite | ||
runtime: org.freedesktop.Platform | ||
runtime-version: "23.08" | ||
sdk: org.freedesktop.Sdk | ||
sdk-extensions: | ||
- org.freedesktop.Sdk.Extension.golang | ||
command: ignite | ||
|
||
finish-args: | ||
- --share=network | ||
- --device=all | ||
- --filesystem=host | ||
build-options: | ||
append-path: /usr/lib/sdk/golang/bin | ||
build-args: | ||
- --share=network | ||
env: | ||
- GOBIN=/app/bin | ||
- GOROOT=/usr/lib/sdk/golang | ||
|
||
modules: | ||
- name: ignite | ||
buildsystem: simple | ||
build-commands: | ||
- $GOROOT/bin/go build -mod=readonly -o ignt ./ignite/cmd/ignite | ||
- install -Dm00755 ignt $FLATPAK_DEST/bin/ignite | ||
#- install -Dm00644 packaging/flatpak/logo.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/ignite.svg | ||
#- install -Dm00644 packaging/flatpak/ignite.desktop $FLATPAK_DEST/share/applications/ignite.desktop | ||
#- install -Dm00644 packaging/flatpak/ignite.metainfo.xml $FLATPAK_DEST/share/metainfo/ignite.metainfo.xml | ||
sources: | ||
- type: git | ||
url: "https://github.com/ignite/cli.git" | ||
tag: "v28.0.0" |
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] | ||
Type=Application | ||
|
||
Name=ignite | ||
Comment=Ignite CLI is the all-in-one platform to build, launch, and maintain any crypto application on a sovereign and secured blockchain | ||
Categories=Utility;Development;Network | ||
|
||
Icon=ignite | ||
Exec=ignite | ||
Terminal=true |
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,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop-application"> | ||
<id>com.ignite.Ignite</id> | ||
|
||
<name>Ignite CLI</name> | ||
<developer_name>Ignite</developer_name> | ||
|
||
<summary>Ignite CLI is the all-in-one platform to build, launch, and maintain any crypto | ||
application on a sovereign and secured blockchain.</summary> | ||
|
||
<categories> | ||
<category>Development</category> | ||
</categories> | ||
|
||
<metadata_license>Apache</metadata_license> | ||
<project_license>Apache</project_license> | ||
|
||
<keywords> | ||
<keyword>ignite</keyword> | ||
<keyword>cosmos</keyword> | ||
<keyword>cosmos-sdk</keyword> | ||
<keyword>blockchain</keyword> | ||
<keyword>development</keyword> | ||
<keyword>tendermint</keyword> | ||
</keywords> | ||
|
||
<recommends> | ||
<control>keyboard</control> | ||
</recommends> | ||
|
||
<description> | ||
<p>Ignite CLI offers everything you need to build, test, and launch your blockchain with a | ||
decentralized worldwide community.</p> | ||
<p>Ignite CLI is built on top of Cosmos SDK, the world's most popular blockchain framework.</p> | ||
<p>Ignite CLI accelerates chain development by scaffolding everything you need so you can focus | ||
on business logic.</p> | ||
</description> | ||
|
||
<launchable type="desktop-id">ignite.desktop</launchable> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://raw.githubusercontent.com/ignite/cli/v0.27.1/assets/ignite-cli.png</image> | ||
<caption>How it works</caption> | ||
</screenshot> | ||
</screenshots> | ||
|
||
<url type="bugtracker">https://github.com/ignite/cli/issues</url> | ||
<url type="homepage">https://github.com/ignite/cli</url> | ||
|
||
<content_rating type="oars-1.1" /> | ||
|
||
<releases> | ||
<release version="28.0.0" date="2023-12-05" type="stable"> | ||
<description> | ||
<p>Ignite CLI v28.0.0 adds support for Cosmos SDK Eden (v0.50)</p> | ||
</description> | ||
<url type="details">https://github.com/ignite/cli/releases/tag/v28.0.0</url> | ||
</release> | ||
</releases> | ||
|
||
</component> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
name: ignite | ||
base: core22 # the base snap is the execution environment for this snap | ||
version: "28.0.0" | ||
summary: Build, launch, and maintain any crypto application with Ignite CLI # 79 char long summary | ||
description: | | ||
Ignite CLI offers everything you need to build, test, and launch your blockchain with a decentralized worldwide community. Ignite CLI is built on top of Cosmos SDK, the world's most popular blockchain framework. | ||
Ignite CLI accelerates chain development by scaffolding everything you need so you can focus on business logic. | ||
grade: stable # must be 'stable' to release into candidate/stable channels | ||
confinement: classic | ||
|
||
parts: | ||
ignite: | ||
plugin: go | ||
source: https://github.com/ignite/cli.git | ||
source-tag: v28.0.0 | ||
source-subdir: ignite/cmd/ignite | ||
build-snaps: | ||
- go | ||
|
||
apps: | ||
ignite: | ||
command: bin/ignite | ||
plugs: [home, network, network-bind, removable-media] |