Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ docs: ## Build documentation

.PHONY: docs-auto
docs-auto: ## Build and host docs with sphinx-autobuild
uv run --group docs sphinx-autobuild -b dirhtml --open-browser --port=8080 --watch $(PROJECT) -W $(DOCS) $(DOCS_OUTPUT)
uv run --group docs sphinx-autobuild -b dirhtml --open-browser --port=8080 -W $(DOCS) $(DOCS_OUTPUT)

# Below are intermediate targets for setup. They are not included in help as they should
# not be used independently.
Expand Down
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@

# region Options for extensions

intersphinx_mapping = {
"launchpad": ("https://documentation.ubuntu.com/launchpad", None),
"ubuntu": ("https://documentation.ubuntu.com/project", None),
}

# Client-side page redirects.
rediraffe_redirects = "redirects.txt"

Expand Down
1 change: 1 addition & 0 deletions docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ These pages walk you through the manual processes and workflows in the Starcraft

starcraft-style-guide
add-a-page-meta-description
publish-a-snap

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put this above the others.

Later I can add a documentation node.

64 changes: 64 additions & 0 deletions docs/how-to/publish-a-snap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.. meta::
:description: How to publish a Starcraft app as a snap in the snap store.


.. _how-to-publish-a-starcraft-snap:

Publish a Starcraft snap
========================

Craft apps are packed into snaps and published to the Snap Store according to
the process in this guide. Our process doesn't apply to other apps or snaps
maintained by other teams.

We build our snaps on Launchpad with
:external+launchpad:ref:`snap recipes <build-snaps-in-launchpad>`. Each snap must have
three channels for the latest revisions:

- ``latest/edge``
- ``latest/candidate``
- ``latest/stable``

Once a craft app reaches version 2.0, there should be a track representing each
supported major release.

Initialize the project on Launchpad
-----------------------------------

If the app is new, you must register and sync it on Launchpad before you can
publish it.

First, `register the project <https://launchpad.net/projects/+new>`__. Make
`~canonical-starcraft <https://launchpad.net/~canonical-starcraft>`__ both the
maintainer and the driver.

Next, set the project to import from the source on GitHub.

If successful, https://code.launchpad.net/<yourcraft> should open the imported Git
repository. If it isn't working, compare your project to the settings and
results in https://code.launchpad.net/snapcraft.

Register the snap
-----------------

If the snap is not yet registered, run ``snapcraft register <craft-name>`` in a terminal
to register it. When creating the recipe for the candidate channel, contact the store
team to have Canonical take ownership.

Publish to ``latest/edge``
--------------------------
Comment on lines +48 to +49

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The focus of this section is muddled to me:

  • The intro mentions recipes, and we make the first section a prereq of creating a recipe. It sounds to me that recipe creation is the task here.
  • In the intro we also list the candidate and stable channels. Does the dev need to set those up, too? Why only edge?


The ``main`` branch of all craft apps should publish to the ``latest/edge``
channel. This is typically the first recipe that you create.

Go to the project page on Launchpad and click **Create snap package**. Name the recipe
**<yourcraft>-edge** and give the Starcraft team ownership of it.

Select the main branch of the app's repository and check all relevant processors for
your app. In most cases, this will be the :external+ubuntu:ref:`supported architectures
<supported-architectures>` for the latest Ubuntu LTS, or a subset of it.

Select **Automatically build when branch changes** and **Automatically upload to store**,
and enter the snap name. Leave the track empty and select the **Edge** risk.

After saving, test that the builds work correctly by manually requesting a build.