Package plexfuse.cache, plexfuse.vfs, plexfuse.vfs.entry modules #8
Workflow file for this run
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 workflow will upload a Python Package using Twine when a release is created | |
# For more information see: | |
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Upload Python Package | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
permissions: | |
contents: read | |
env: | |
DEFAULT_PYTHON: 3.11 | |
jobs: | |
deploy: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://pypi.org/p/plex-fuse | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set version variable | |
id: vars | |
run: | | |
if [[ "${GITHUB_REF#refs/heads/}" = "${GITHUB_REF}" ]]; then | |
APP_VERSION=${GITHUB_REF#refs/tags/} | |
else | |
git fetch --tags --unshallow | |
version=$(git describe --tags --abbrev=0) | |
subver=${{ github.run_number }} | |
APP_VERSION=$version.post$subver | |
fi | |
echo "version=$APP_VERSION" >> $GITHUB_OUTPUT | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install dependencies and build | |
env: | |
APP_VERSION: ${{ steps.vars.outputs.version }} | |
run: | | |
set -x | |
echo "__version__ = '$APP_VERSION'" > plexfuse/__version__.py | |
cat plexfuse/__version__.py | |
python -c "from plexfuse import __version__; print(__version__)" | |
python -m pip install --upgrade build | |
python -m build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
# vim:ts=2:sw=2:et |