From b7ec06b532aadd2e9732d2012dea176244b5f046 Mon Sep 17 00:00:00 2001 From: Kyrch Date: Thu, 27 Feb 2025 15:44:55 -0300 Subject: [PATCH] chore: pypi workflows are now using token (#9) --- .github/CONTRIBUTING.md | 4 +-- .github/workflows/pylint.yml | 22 ---------------- .github/workflows/python-publish.yml | 38 +++++++++------------------- setup.py | 2 +- 4 files changed, 15 insertions(+), 51 deletions(-) delete mode 100644 .github/workflows/pylint.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5b9a837..96e014e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,9 +2,9 @@ Unless otherwise specified, any issue that does not have an assignee can be claimed by any volunteer. -Leave a comment in the issue indicating interest so that the assignee can be designated by a member. This is a requirement in Github to allow assignment of contributors outside of the organization by members. +Leave a comment in the issue indicating interest so that the assignee can be designated by a member. This is a requirement in Github to allow assignment of contributors outside of the organization by members. -If further discussion is needed before work can be started, please make use of the `#design` channel on the discord. +If further discussion is needed before work can be started, please make use of the `#encoding_general` channel on the discord. ## Development Environment diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index 7b03a2a..0000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Pylint - -on: [push] - -jobs: - pylint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - - name: Run pylint - run: | - pylint test_webm \ No newline at end of file diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1a03a7b..83dd314 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,31 +1,17 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -name: Upload Python Package - +name: Publish to PyPI.org on: release: - types: [created] - + types: [published] jobs: - deploy: - + pypi: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: python3 -m pip install --upgrade build && python3 -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/setup.py b/setup.py index f907117..b5c635e 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('README.md') as f: setup( name='animethemes-webm-verifier', - version='1.2.2', + version='1.2.3', author='AnimeThemes', author_email='admin@animethemes.moe', url='https://github.com/AnimeThemes/animethemes-webm-verifier',