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
Open
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
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ jobs:
**/*.exe
**/*.snap
**/*.blockmap
publish-to-snapcraft:
name: Publish to Snapcraft
needs:
- publish
- release-please
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: built-app-x64-linux
- name: Publish to Snapcraft
uses: snapcore/action-publish@v1
env:
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.

publish-to-winget:
name: Publish to WinGet
needs:
Expand Down
Loading