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

Updated workflows and README #11

Merged
merged 7 commits into from
Jan 23, 2024
Merged
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
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every month
interval: "monthly"
25 changes: 25 additions & 0 deletions .github/workflows/promote-to-stable.yml
Original file line number Diff line number Diff line change
@@ -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 }}
17 changes: 17 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -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
71 changes: 71 additions & 0 deletions .github/workflows/release-to-candidate.yml
Original file line number Diff line number Diff line change
@@ -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 }}
29 changes: 29 additions & 0 deletions .github/workflows/sync-version-with-upstream.yml
Original file line number Diff line number Diff line change
@@ -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

25 changes: 0 additions & 25 deletions .github/workflows/test-snap-can-build.yml

This file was deleted.

72 changes: 68 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<h1 align="center">
<img src="https://camo.githubusercontent.com/893c14fc8d8fe77c40b5e327e1bce30fd054ded07f2b7220d44ce73a7f18d446/68747470733a2f2f63646e2e7261776769742e636f6d2f7a2d2d2d2d2d2d2d2d2d2d2d2d2d2f63756d756c6f6e696d6275732f33356339353836382f6275696c642f69636f6e2e737667" alt="Project">
<img src="https://github.com/z-------------/CPod/blob/master/build/icons/128x128.png" alt="Project">
<br />
CPod
</h1>

<p align="center"><b>This is the snap for CPod</b>. 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.</p>
<p align="center"><b>This is the snap for CPod</b>. 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.</p>

<p align="center"><i>"A simple, beautiful podcast app."</p>
<p align="center"><i>"A simple, beautiful podcast app."</i></p>

<p align="center"><b>NOTE: CPod is unmaintained and may contain bugs and security vulnerabilities.</b></p>
<p align="center"><i>Please reference (https://github.com/z-------------/CPod/) for more info.</i>

<p align="center">
<a href="https://snapcraft.io/cumulonimbus"><img src="https://snapcraft.io/cumulonimbus/badge.svg" alt="Snap Status"></a>
<a href="https://github.com/snapcrafters/cumulonimbus/actions/workflows/sync-version-with-upstream.yml"><img src="https://github.com/snapcrafters/cumulonimbus/actions/workflows/sync-version-with-upstream.yml/badge.svg"></a>
<a href="https://github.com/snapcrafters/cumulonimbus/actions/workflows/release-to-candidate.yaml"><img src="https://github.com/snapcrafters/cumulonimbus/actions/workflows/release-to-candidate.yml/badge.svg"></a>
<a href="https://github.com/snapcrafters/cumulonimbus/actions/workflows/promote-to-stable.yml"><img src="https://github.com/snapcrafters/cumulonimbus/actions/workflows/promote-to-stable.yml/badge.svg"></a>
</p>

## Install
Expand All @@ -22,6 +28,64 @@ snap install cumulonimbus

<p align="center">Published for <img src="https://raw.githubusercontent.com/anythingcodes/slack-emoji-for-techies/gh-pages/emoji/tux.png" align="top" width="24" /> with :gift_heart: by Snapcrafters</p>

## 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
4 changes: 1 addition & 3 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading