-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
135 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
name-template: '$RESOLVED_VERSION' | ||
tag-template: '$RESOLVED_VERSION' | ||
change-template: '- #$NUMBER - $TITLE (@$AUTHOR)' | ||
categories: | ||
- title: "⬆️ Dependencies" | ||
- title: "⚠ Breaking Changes" | ||
labels: | ||
- 'breaking-change' | ||
- title: '⬆️ Dependencies' | ||
collapse-after: 1 | ||
labels: | ||
- "dependencies" | ||
- 'dependencies' | ||
- 'ci' | ||
template: | | ||
## What's Changed | ||
## What’s Changed | ||
$CHANGES | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'breaking-change' | ||
minor: | ||
labels: | ||
- 'new-feature' | ||
- 'enhancement' | ||
default: patch |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: PR Labels | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
types: | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pr_labels: | ||
name: Verify | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🏷 Verify PR has a valid label | ||
uses: ludeeus/[email protected] | ||
with: | ||
labels: >- | ||
breaking-change, bugfix, refactor, new-feature, maintenance, ci, dependencies, new-provider |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Publish releases | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-and-publish-pypi: | ||
name: Builds and publishes releases to PyPI | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.vars.outputs.tag }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Get tag | ||
id: vars | ||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
- name: Set up Python 3.10 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.10" | ||
- name: Install build | ||
run: >- | ||
pip install build tomli tomli-w | ||
- name: Set Python project version from tag | ||
shell: python | ||
run: |- | ||
import tomli | ||
import tomli_w | ||
with open("pyproject.toml", "rb") as f: | ||
pyproject = tomli.load(f) | ||
pyproject["project"]["version"] = "${{ steps.vars.outputs.tag }}" | ||
with open("pyproject.toml", "wb") as f: | ||
tomli_w.dump(pyproject, f) | ||
- name: Build | ||
run: >- | ||
python3 -m build | ||
- name: Publish release to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
build-and-push-container-image: | ||
name: Builds and pushes the Music Assistant Server container to ghcr.io | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
needs: build-and-publish-pypi | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Log in to the GitHub container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Version number for tags | ||
id: tags | ||
shell: bash | ||
run: |- | ||
patch=${GITHUB_REF#refs/*/} | ||
echo "patch=${patch}" >> $GITHUB_OUTPUT | ||
echo "minor=${patch%.*}" >> $GITHUB_OUTPUT | ||
echo "major=${patch%.*.*}" >> $GITHUB_OUTPUT | ||
if [[ $string =~ "b" ]]; then | ||
echo "channel=beta" >> $GITHUB_OUTPUT | ||
else | ||
echo "channel=stable" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Build and Push | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: Dockerfile | ||
tags: |- | ||
ghcr.io/${{ github.repository_owner }}/python-matter-server:${{ steps.tags.outputs.patch }}, | ||
ghcr.io/${{ github.repository_owner }}/python-matter-server:${{ steps.tags.outputs.minor }}, | ||
ghcr.io/${{ github.repository_owner }}/python-matter-server:${{ steps.tags.outputs.major }}, | ||
ghcr.io/${{ github.repository_owner }}/python-matter-server:${{ steps.tags.outputs.channel }} | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,15 @@ jobs: | |
|
||
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/checkout@v3.3.0 | ||
uses: actions/checkout@v3.5.3 | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
python -m pip install --upgrade pip build setuptools | ||
pip install . .[test] | ||
- name: Lint/test with pre-commit | ||
|
@@ -39,7 +41,7 @@ jobs: | |
|
||
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/checkout@v3.3.0 | ||
uses: actions/checkout@v3.5.3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
|