-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated app-release action * Got tests working locally * Updated test CI * WIP - set up dev dockerfile * Reverted pytest shenanigans * Create a script to consolidate version bumping * Added new pypi actions file * Added pip install to 'prod' dockerfile
- Loading branch information
1 parent
56c4a18
commit 46e5555
Showing
9 changed files
with
86 additions
and
29 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
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,29 @@ | ||
name: Publish Python distribution to PyPI and TestPyPI | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build distribution | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/fertilizer | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install pypa/build | ||
run: python3 -m pip install build twine --user | ||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,21 @@ | ||
FROM python:3.11-slim-buster | ||
|
||
WORKDIR /app | ||
|
||
COPY pyproject.toml docker_start ./ | ||
COPY src src | ||
|
||
RUN apt-get update \ | ||
&& echo "----- Installing python requirements" \ | ||
&& pip install uv \ | ||
&& uv pip install -r pyproject.toml --system --all-extras \ | ||
&& uv pip install -e . --system \ | ||
&& echo "----- Preparing directories" \ | ||
&& mkdir /config /data /torrents \ | ||
&& echo "----- Cleanup" \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
EXPOSE 9713 | ||
|
||
ENTRYPOINT ["./docker_start"] |
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Get current version from pyproject.toml | ||
CURRENT_VERSION=$(grep "^version = " pyproject.toml | sed "s/^version = \"\(.*\)\"/\1/g") | ||
# Get the new version from stdin | ||
NEW_VERSION=$1 | ||
|
||
echo "Bumping from $CURRENT_VERSION to $NEW_VERSION" | ||
|
||
# Check that the user wants to continue. exit if not | ||
read -p "Continue? (y/n) " -n 1 -r | ||
echo # move to a new line | ||
|
||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
# Update the version in the pyproject.toml file | ||
sed -i "" "s/^version = \".*\"/version = \"$NEW_VERSION\"/g" "pyproject.toml" | ||
|
||
# Set the git tag | ||
git tag "v$NEW_VERSION" | ||
fi |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.