Through this tutorial we'll see the whole process of publishing a charm: building it, uploading it to the store, and releasing it.
For simplicity we start by having a ready-to-build charm. If you want to start from a previous step, please check this other tutorial on how to build a charm using modern tools.
FIXME: build the structure, remember to include a version.txt file!!!!! FIXME: show the structure!!!
As I said, the first step is building the charm:
charmcraft build
FIXME: cmd line verbatim
As the command indicated, I have my charm binary built:
ls -l charm
FIXME: cmd line verbatim
If this is our first time with this charm, we will need to register this name in the Store:
charmcraft register ALGO
FIXME: cmd line verbatim
[[FIXME: markup this as a "note"
All commands to the Store needs for us to be authenticated. This is handled automatically by charmcraft: if the credentials expired or not found a browser page will open for us to authenticate against the Store as we usually do in the web. We can always check how is our authentication status by issuing charmcraft whoami.
]]
If in doubt, we can easily check all our registered names:
charmcraft names
FIXME: cmd line verbatim
Now we're ready to upload the binary. As we're in our project's directory the command is very simple (otherwise we would need to use the --charm-file option to specify the binary's location):
charmcraft upload
FIXME: cmd line verbatim
Everytime we upload a new binary for the charm we get a new revision in the Store. We can verify its current status easily:
charmcraft revisions
FIXME: cmd line verbatim
Note that we didn't specify the charm's name: this is because we're in the project's directory, so the name is retrieved automatically; if you want to ask for any other charm you can use the FIXME option.
Now it's time to release!
charmcraft release
FIXME: cmd line verbatim
Finally, we can see the overall status:
charmcraft status
FIXME: cmd line verbatim