diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index dd1f4a185c..eeff8c13de 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -2,7 +2,7 @@ name: Release Binaries on: release: - types: [ published ] + types: [published] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest env: working-directory: go/src/github.com/ignite/cli - + steps: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.21' + go-version: "1.21" - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/snapcraft.yml b/.github/workflows/snapcraft.yml new file mode 100644 index 0000000000..6d16f32550 --- /dev/null +++ b/.github/workflows/snapcraft.yml @@ -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 diff --git a/changelog.md b/changelog.md index dd2760967a..4069a10ab0 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ ### Features +- [#3786](https://github.com/ignite/cli/pull/3786) Add artifacts for publishing Ignite to FlatHub and Snapcraft - [#3830](https://github.com/ignite/cli/pull/3830) Remove gRPC info from Ignite Apps errors ### Changes diff --git a/packaging/.gitignore b/packaging/.gitignore new file mode 100644 index 0000000000..0ec52ff128 --- /dev/null +++ b/packaging/.gitignore @@ -0,0 +1,4 @@ +.flatpak-builder +build-dir +repo +*.snap \ No newline at end of file diff --git a/packaging/README.md b/packaging/README.md new file mode 100644 index 0000000000..2edc911c15 --- /dev/null +++ b/packaging/README.md @@ -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. + +* +* + +```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 . +The update process is done manually at 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. + +* +* +* + +```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. diff --git a/packaging/flatpak/com.ignite.Ignite.yml b/packaging/flatpak/com.ignite.Ignite.yml new file mode 100644 index 0000000000..875b63aa26 --- /dev/null +++ b/packaging/flatpak/com.ignite.Ignite.yml @@ -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" diff --git a/packaging/flatpak/ignite.desktop b/packaging/flatpak/ignite.desktop new file mode 100644 index 0000000000..3ecb57280a --- /dev/null +++ b/packaging/flatpak/ignite.desktop @@ -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 \ No newline at end of file diff --git a/packaging/flatpak/ignite.metainfo.xml b/packaging/flatpak/ignite.metainfo.xml new file mode 100644 index 0000000000..9f2ec83586 --- /dev/null +++ b/packaging/flatpak/ignite.metainfo.xml @@ -0,0 +1,61 @@ + + + com.ignite.Ignite + + Ignite CLI + Ignite + + Ignite CLI is the all-in-one platform to build, launch, and maintain any crypto + application on a sovereign and secured blockchain. + + + Development + + + Apache + Apache + + + ignite + cosmos + cosmos-sdk + blockchain + development + tendermint + + + + keyboard + + + +

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.

+
+ + ignite.desktop + + + https://raw.githubusercontent.com/ignite/cli/v0.27.1/assets/ignite-cli.png + How it works + + + + https://github.com/ignite/cli/issues + https://github.com/ignite/cli + + + + + + +

Ignite CLI v28.0.0 adds support for Cosmos SDK Eden (v0.50)

+
+ https://github.com/ignite/cli/releases/tag/v28.0.0 +
+
+ +
\ No newline at end of file diff --git a/packaging/flatpak/logo.svg b/packaging/flatpak/logo.svg new file mode 100644 index 0000000000..46a0ffa303 --- /dev/null +++ b/packaging/flatpak/logo.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/packaging/snap/snapcraft.yaml b/packaging/snap/snapcraft.yaml new file mode 100644 index 0000000000..87822b1e9c --- /dev/null +++ b/packaging/snap/snapcraft.yaml @@ -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]