diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ae59171..41ec5a5 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -115,4 +115,52 @@ jobs: - name: Install Package run: | - pip install ${{ env.PACKAGE_NAME }} \ No newline at end of file + pip install ${{ env.PACKAGE_NAME }} + + release_check: + name: Release Check + timeout-minutes: 20 + strategy: + fail-fast: true + matrix: + os: [ ubuntu-latest ] + python-version: [ '3.10' ] + runs-on: ${{ matrix.os }} + needs: build + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + + - name: Build Package + run: | + python setup.py sdist bdist_wheel + + - name: Get Package Name (Windows) + if: matrix.os == 'windows-latest' + run: | + $path_separator = "\\" + $latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + Write-Host "Latest file: $latestFile" + Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Get Package Name (Ubuntu and macOS) + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + run: | + path_separator="/" + latestFile=$(ls -t dist/ | head -n 1) + echo "Latest file: $latestFile" + echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV + + - name: Release Check + run: | + twine check ${{ env.PACKAGE_NAME }} \ No newline at end of file diff --git a/setup.py b/setup.py index d19555a..bcbe9c1 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities :: Configuration Management", + "Topic :: Utilities", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11",