-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload package to PyPI and Dockerhub
- Loading branch information
Showing
5 changed files
with
116 additions
and
6 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 +1,6 @@ | ||
**/* | ||
|
||
!src | ||
!**/*.py | ||
!pyproject.toml | ||
!poetry.lock |
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,74 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-2].[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
|
||
pypi: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Extract tag name | ||
id: tag_name | ||
run: | | ||
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//} | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Publish Package to PyPI | ||
env: | ||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry build | ||
poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD | ||
- name: Wait for PyPI to update indexes | ||
env: | ||
TAG: ${{ steps.tag_name.outputs.TAG }} | ||
run: | | ||
while ! pip install "audiomatch==${TAG}"; do | ||
sleep 2s | ||
done; | ||
dockerhub: | ||
needs: pypi | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Extract tag name | ||
id: tag_name | ||
run: | | ||
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//} | ||
- name: Build Docker image | ||
env: | ||
TAG: ${{ steps.tag_name.outputs.TAG }} | ||
run: | | ||
docker build . -t fdooch/audiomatch:"${TAG}" --build-arg package_version="${TAG}" | ||
- name: Log in to the Dockerhub registry | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
run: | | ||
echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin | ||
- name: Push to Dockerhub | ||
env: | ||
TAG: ${{ steps.tag_name.outputs.TAG }} | ||
run: | | ||
docker push fdooch/audiomatch:"${TAG}" |
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
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,14 +1,25 @@ | ||
[tool.poetry] | ||
name = "audiomatch" | ||
version = "0.1.0" | ||
description = "" | ||
version = "0.1.6" | ||
description = "A small command-line tool to find similar audio files" | ||
keywords = ["duplicate", "detection", "audio", "fingerprinting", "command-line"] | ||
readme = "README.rst" | ||
authors = ["Aleksei Maslakov <[email protected]>"] | ||
license = "MIT" | ||
packages = [ | ||
{ include = "audiomatch", from = "src" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.8", | ||
"Topic :: Multimedia :: Sound/Audio :: Analysis", | ||
"Typing :: Typed", | ||
] | ||
|
||
[tool.poetry.scripts] | ||
audiomatch = "audiomatch.cli:main" | ||
audiomatch = "audiomatch.cli:invoke" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
|