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

Release Please #374

Merged
merged 4 commits into from
Sep 2, 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/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ jobs:
mv code_quality/.docstr.yaml . # --config option didn't work
docstr-coverage 2>&1 | tee docstr/docstring_coverage.txt
ls docs/badges

commitlint:
runs-on: ubuntu-latest
name: Commitlint
steps:
- name: Run commitlint
uses: opensource-nepal/commitlint@v1
73 changes: 73 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
on:
push:
branches:
- master

name: release-please

permissions:
contents: write
pull-requests: write


jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}

build-and-publish:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
environment:
name: pypi
url: https://pypi.org/p/pikaraoke
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Cache Poetry Install
id: cache-poetry
uses: actions/cache@v4
with:
path: |
/opt/poetry
~/.cache/pypoetry
.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml')
}}

- name: Install Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
export POETRY_HOME=/opt/poetry
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.8.2
$POETRY_HOME/bin/poetry --version

- name: Add Poetry to PATH
run: echo "/opt/poetry/bin" >> $GITHUB_PATH

- name: Install Package
run: poetry install --no-interaction --no-ansi

- name: Build Package
run: poetry build

- name: Publish Python 🐍 distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Empty file added .release-please-manifest.json
Empty file.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PiKaraoke

[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg)](https://conventionalcommits.org)

PiKaraoke is a "KTV"-style karaoke song search and queueing system. It connects to your TV, and shows a QR code for computers and smartphones to connect to a web interface. From there, multiple users can seamlessly search your local track library, queue up songs, add an endless selection of new karaoke tracks from YouTube, and more. Works on Raspberry Pi, OSX, Windows, and Linux!

If you want to support this project with a little monetary tip, it's much appreciated: <br/>
Expand Down
4 changes: 2 additions & 2 deletions pikaraoke/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from pikaraoke.constants import VERSION
from pikaraoke.karaoke import Karaoke
from pikaraoke.lib.get_platform import get_platform
from pikaraoke.version import __version__

__version__ = VERSION
PACKAGE = __package__
VERSION = __version__

__all__ = [
"VERSION",
Expand Down
4 changes: 2 additions & 2 deletions pikaraoke/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait

from pikaraoke import karaoke
from pikaraoke.constants import LANGUAGES, VERSION
from pikaraoke import VERSION, karaoke
from pikaraoke.constants import LANGUAGES
from pikaraoke.lib.get_platform import get_platform, is_raspberry_pi

try:
Expand Down
1 change: 0 additions & 1 deletion pikaraoke/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
VERSION = "1.2.1"
LANGUAGES = {
"en": "English",
"zh_CN": "Chinese",
Expand Down
1 change: 1 addition & 0 deletions pikaraoke/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.3.0" # {x-release-please-version}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pikaraoke"
version = "1.0.0"
version = "1.3.0"
description = "Youtube-based Karaoke machine for Raspberry Pi, OSX, Windows, and Linux"
authors = ["Vic Wong"]

Expand Down
13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"package-name": "pikaraoke",
"release-type": "python",
"include-component-in-tag": false,
"include-v-in-tag": false,
"changelog-path": "pikaraoke/CHANGELOG.md",
"version-file": "pikaraoke/version.py"
}
}
}