diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..169e893 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every month + interval: "monthly" diff --git a/.github/workflows/promote-to-stable.yml b/.github/workflows/promote-to-stable.yml new file mode 100644 index 0000000..f38b063 --- /dev/null +++ b/.github/workflows/promote-to-stable.yml @@ -0,0 +1,25 @@ +name: Promote + +on: + issue_comment: + types: + - created + +permissions: + issues: write + +jobs: + promote: + name: โฌ๏ธ Promote to stable + environment: "Candidate Branch" + runs-on: ubuntu-latest + if: | + ( !github.event.issue.pull_request ) + && contains(github.event.comment.body, '/promote ') + && contains(github.event.*.labels.*.name, 'testing') + steps: + - name: โฌ๏ธ Promote to stable + uses: snapcrafters/ci/promote-to-stable@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + store-token: ${{ secrets.SNAP_STORE_STABLE }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..48d1faf --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,17 @@ +name: Pull Request + +on: + pull_request: + branches: [ "**" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: ๐งช Build snap on amd64 + runs-on: ubuntu-latest + steps: + - name: ๐งช Build snap on amd64 + uses: snapcrafters/ci/test-snap-build@main diff --git a/.github/workflows/release-to-candidate.yml b/.github/workflows/release-to-candidate.yml new file mode 100644 index 0000000..e84eec0 --- /dev/null +++ b/.github/workflows/release-to-candidate.yml @@ -0,0 +1,71 @@ +name: Release + +on: + # Run the workflow each time new commits are pushed to the candidate branch. + push: + branches: [ "candidate" ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + issues: write + +jobs: + get-architectures: + name: ๐ฅ Get snap architectures + runs-on: ubuntu-latest + outputs: + architectures: ${{ steps.get-architectures.outputs.architectures }} + architectures-list: ${{ steps.get-architectures.outputs.architectures-list }} + steps: + - name: ๐ฅ Get snap architectures + id: get-architectures + uses: snapcrafters/ci/get-architectures@main + + release: + name: ๐ข Release to latest/candidate + needs: get-architectures + runs-on: ubuntu-latest + environment: "Candidate Branch" + strategy: + matrix: + architecture: ${{ fromJSON(needs.get-architectures.outputs.architectures-list) }} + steps: + - name: ๐ข Release to latest/candidate + uses: snapcrafters/ci/release-to-candidate@main + with: + architecture: ${{ matrix.architecture }} + launchpad-token: ${{ secrets.LP_BUILD_SECRET }} + store-token: ${{ secrets.SNAP_STORE_CANDIDATE }} + + call-for-testing: + name: ๐ฃ Create call for testing + needs: [release, get-architectures] + environment: "Candidate Branch" + runs-on: ubuntu-latest + outputs: + issue-number: ${{ steps.issue.outputs.issue-number }} + steps: + - name: ๐ฃ Create call for testing + id: issue + uses: snapcrafters/ci/call-for-testing@main + with: + architectures: ${{ needs.get-architectures.outputs.architectures }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + screenshots: + name: ๐ธ Gather screenshots + needs: call-for-testing + environment: "Candidate Branch" + runs-on: ubuntu-latest + steps: + - name: ๐ธ Gather screenshots + uses: snapcrafters/ci/get-screenshots@main + with: + issue-number: ${{ needs.call-for-testing.outputs.issue-number }} + github-token: ${{ secrets.GITHUB_TOKEN }} + screenshots-token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }} diff --git a/.github/workflows/sync-version-with-upstream.yml b/.github/workflows/sync-version-with-upstream.yml new file mode 100644 index 0000000..4e96ae4 --- /dev/null +++ b/.github/workflows/sync-version-with-upstream.yml @@ -0,0 +1,29 @@ +name: Update + +on: + # Runs at 10:00 UTC every day + schedule: + - cron: '0 10 * * *' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + sync: + name: ๐ Sync version with upstream + environment: "Candidate Branch" + runs-on: ubuntu-latest + steps: + - name: ๐ Sync version with upstream + uses: snapcrafters/ci/sync-version@main + with: + token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }} + update-script: | + # Update the snapcraft.yaml to match upstream version + API="https://api.github.com/repos/z-------------/CPod/releases/latest" + VERSION=$(curl -s "${API}" | jq -r .tag_name | sed 's/v//g') + sed -i 's/^\(version: \).*$/\1'"'$VERSION'"'/' snap/snapcraft.yaml + diff --git a/.github/workflows/test-snap-can-build.yml b/.github/workflows/test-snap-can-build.yml deleted file mode 100644 index 88650dd..0000000 --- a/.github/workflows/test-snap-can-build.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: ๐งช Test snap can be built on x86_64 - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: snapcore/action-build@v1 - id: build - - - uses: diddlesnaps/snapcraft-review-action@v1 - with: - snap: ${{ steps.build.outputs.snap }} - isClassic: 'false' - # Plugs and Slots declarations to override default denial (requires store assertion to publish) - # plugs: ./plug-declaration.json - # slots: ./slot-declaration.json diff --git a/README.md b/README.md index bc24a0b..33dbd4b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,21 @@
This is the snap for CPod. It is a community-maintained package to easily install CPod on Ubuntu, Fedora, Debian and other major Linux distributions. It is available in the Snap Store, Ubuntu Software, and a number of other software stores.
+This is the snap for CPod. It is a community-maintained package to easily install Cpod on Ubuntu, Fedora, Debian and other major Linux distributions. It is available in the Snap Store, Ubuntu Software, and a number of other software stores.
-"A simple, beautiful podcast app."
+"A simple, beautiful podcast app."
+ +NOTE: CPod is unmaintained and may contain bugs and security vulnerabilities.
+Please reference (https://github.com/z-------------/CPod/) for more info.
## Install @@ -22,6 +28,64 @@ snap install cumulonimbusPublished for with :gift_heart: by Snapcrafters
+## How to contribute to this snap + +Thanks for your interest! Below you find instructions to help you contribute to this snap. + +The general workflow is to submit pull requests that merges your changes into the `candidate` branch here on GitHub. Once the pull request has been merged, a GitHub action will automatically build the snap and publish it to the `candidate` channel in the Snap Store. Once the snap has been tested thoroughly, we promote it to the `stable` channel so all our users get it! + +### Initial setup + +If this is your first time contributing to this snap, you first need to set up your own fork of this repository. + +1. [Fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) into your own GitHub namespace. +2. [Clone your fork](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository), so that you have it on your local computer. +3. Configure your local repo. To make things a bit more intuitive, we will rename your fork's remote to `myfork`, and add the snapcrafters repo as `snapcrafters`. + + ```shell + git remote rename origin myfork + git remote add snapcrafters https://github.com/snapcrafters/cumulonimbus.git + git fetch --all + ``` + +### Submitting changes in a pull request + +Once you're all setup for contributing, keep in mind that you want the git information to be all up-to-date. So if you haven't "fetched" all changes in a while, start with that: + +```shell +git fetch --all -p +``` + +Now that your git metadata has been updated you are ready to create a bugfix branch, make your changes, and open a pull request. + +1. All pull requests should go to the stable branch so create your branch as a copy of the stable branch: + + ```shell + git checkout -b my-bugfix-branch snapcrafters/candidate + ``` + +2. Make your desired changes and build a snap locally for testing: + + ```shell + snapcraft --use-lxd + ``` + +3. After you are happy with your changes, commit them and push them to your fork so they are available on GitHub: + + ```shell + git commit -a + git push -u myfork my-bugfix-branch + ``` + +4. Then, [open up a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) from your `my-bugfix-branch` to the `snapcrafters/candidate` branch. +5. Once you've opened the pull request, it will automatically trigger the build-test action that will launch a build of the snap. You can watch the progress of the snap build from your pull request (Show all checks -> Details). Once the snap build has completed, you can find the built snap (to test with) under "Artifacts". +6. Someone from the team will review the open pull request and either merge it or start a discussion with you with additional changes or clarification needed. +7. Once the pull request has been merged into the stable branch, a GitHub action will rebuild the snap using your changes and publish it to the [Snap Store](https://snapcraft.io/cumulonimbus) into the `candidate` channel. After sufficient testing of the snap from the candidate channel, one of the maintainers or administrators will promote the snap to the stable branch in the Snap Store. + +## Maintainers + +- [@kz6fittycent](https://github.com/kz6fittycent) + ## License -The license of the build files in this repository and CPod itself are Apache License, Version 2.0 +The license of the build files in this repository and cumulonimbus itself are Apache License, Version 2.0 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9766536..ddfef4b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -21,8 +21,7 @@ contact: https://github.com/snapcrafters/cumulonimbus/issues issues: https://github.com/snapcrafters/cumulonimbus/issues source-code: https://github.com/snapcrafters/cumulonimbus icon: snap/gui/cumulonimbus.png -adopt-info: cpod - +version: '1.28.2' grade: stable confinement: strict @@ -48,7 +47,6 @@ parts: dpkg -x cpod.deb ${CRAFT_PART_INSTALL} rm cpod.deb releases.json sed -i 's|Icon=cpod|Icon=${SNAP}/usr/share/icons/hicolor/512x512/apps/cpod.png|' $CRAFT_PART_INSTALL/usr/share/applications/cpod.desktop - craftctl set version="$VERSION" build-packages: - dpkg - jq