Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add snapcraft publish action #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ottnorml
Copy link
Contributor

@ottnorml ottnorml commented Oct 4, 2023

For this action to work the secrets SNAPCRAFT_STORE_LOGIN must be available.

For the snapcraft publish action to work, the SNAPCRAFT_STORE_LOGIN secret must be available. It can be created as described in the documentation of the action (see link). It should be noted that the name of the secret is different from the one in the documentation to be more readable.

$ snapcraft export-login --snaps=PACKAGE_NAME \
      --acls package_access,package_push,package_update,package_release \
      exported.txt

refs #412, #418

SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_LOGIN }}
with:
snap: "*.snap"
release: stable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how the Snapcraft publishing works for Pomatez, since all channels (latest/stable, latest/candidate, latest/beta, latest/edge) offer the same latest version (see link).

So I decided to use only the stable channel. But this can be easily changed or extendedBut this can be easily changed or extended, like this for example:

release: ${{ startsWith(github.ref, 'refs/tags/') && 'candidate' || 'edge'}}

Taken from https://ubuntu.com/robotics/docs/build-and-publish-a-ros-snap-with-github-actions.

Copy link
Member

@roldanjr roldanjr Oct 6, 2023

Choose a reason for hiding this comment

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

I have used the Snapcraft official way of building the Snap package before as you can see here. It triggers when there is a new version released and automatically uploads to the SnapStore but in the edge channel which is ideal then I promote the latest version on the edge to the other channels once I tested it on a Linux machine that it still worked as expected.

But the Snapcraft GitHub integration has been broken and I don't know what happened to why new builds are failing, maybe it is due to some breaking changes on their end that I failed to be updated also, so I decided to remove the integration though I didn't delete the folder yet cause I was thinking it might still be useful for future reference. Right now, I just manually download the snap package here and upload it manually on SnapStore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants