diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 38a3533..1ecfdd9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,77 +1,13 @@ name: Publish On Tag on: - push: - tags: - - 'v*' + workflow_call: jobs: - initial-checks: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Only allow tags on master to be published - run: | - tag_commit=$(git rev-parse ${{ github.ref }}) - master_commit=$(git rev-parse origin/master) - - if [ "$tag_commit" = "$master_commit" ]; then - echo "The tag and master are pointing to the same commit." - else - echo "The tag ($tag_commit) and master ($master_commit) are not pointing to the same commit." - exit 1 - fi - - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - # Exclude macos Python <3.11 due to https://github.com/actions/setup-python/issues/649#issuecomment-1745056485 - exclude: - - os: macos-latest - python-version: 3.7 - - os: macos-latest - python-version: 3.8 - - os: macos-latest - python-version: 3.9 - - os: macos-latest - python-version: 3.10 - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install --upgrade pip - pip install -r requirements.txt - pip install pytest - - - name: Install package - run: pip install -e . - - - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' - run: | - Xvfb :99 & - echo "DISPLAY=:99" >> $GITHUB_ENV - - - name: Run tests for Python ${{ matrix.python-version }} on ${{ matrix.os }} - run: pytest - publish: - needs: [initial-checks, test] runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 @@ -152,10 +88,9 @@ jobs: run: python setup.py sdist bdist_wheel --universal - name: Publish package - uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc + uses: pypa/gh-action-pypi-publish with: - user: __token__ - password: ${{ secrets.pypi_password }} + repository-url: https://test.pypi.org/legacy/ - name: Create release id: create_release diff --git a/setup.py b/setup.py index d6b7025..e1a34d9 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,11 @@ description="Converts .py to .exe using a simple graphical interface.", long_description="".join(open("README.md", encoding="utf-8").readlines()), long_description_content_type="text/markdown", + project_urls={ + "Source Code": "https://github.com/brentvollebregt/auto-py-to-exe", + "Bug Tracker": "https://github.com/brentvollebregt/auto-py-to-exe/issues", + "Changelog": "https://github.com/brentvollebregt/auto-py-to-exe/blob/master/CHANGELOG.md", + }, keywords=["gui", "executable"], packages=["auto_py_to_exe"], include_package_data=True,