Skip to content

Commit 41746dc

Browse files
authored
Fixed Topic for PyPI Release (#5)
1 parent 7e65c6b commit 41746dc

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

.github/workflows/pipeline.yml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,52 @@ jobs:
115115
116116
- name: Install Package
117117
run: |
118-
pip install ${{ env.PACKAGE_NAME }}
118+
pip install ${{ env.PACKAGE_NAME }}
119+
120+
release_check:
121+
name: Release Check
122+
timeout-minutes: 20
123+
strategy:
124+
fail-fast: true
125+
matrix:
126+
os: [ ubuntu-latest ]
127+
python-version: [ '3.10' ]
128+
runs-on: ${{ matrix.os }}
129+
needs: build
130+
steps:
131+
- name: Checkout Repository
132+
uses: actions/checkout@v4
133+
134+
- name: Set up Python
135+
uses: actions/setup-python@v5
136+
with:
137+
python-version: ${{ matrix.python-version }}
138+
139+
- name: Install Dependencies
140+
run: |
141+
python -m pip install --upgrade pip
142+
pip install setuptools wheel twine
143+
144+
- name: Build Package
145+
run: |
146+
python setup.py sdist bdist_wheel
147+
148+
- name: Get Package Name (Windows)
149+
if: matrix.os == 'windows-latest'
150+
run: |
151+
$path_separator = "\\"
152+
$latestFile = Get-ChildItem -Path "dist\\" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
153+
Write-Host "Latest file: $latestFile"
154+
Write-Output "PACKAGE_NAME=dist$path_separator$($latestFile.Name)" | Out-File -FilePath $env:GITHUB_ENV -Append
155+
156+
- name: Get Package Name (Ubuntu and macOS)
157+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
158+
run: |
159+
path_separator="/"
160+
latestFile=$(ls -t dist/ | head -n 1)
161+
echo "Latest file: $latestFile"
162+
echo "PACKAGE_NAME=dist$path_separator$latestFile" >> $GITHUB_ENV
163+
164+
- name: Release Check
165+
run: |
166+
twine check ${{ env.PACKAGE_NAME }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Development Status :: 4 - Beta",
2323
"Intended Audience :: Developers",
2424
"Topic :: Software Development :: Libraries :: Python Modules",
25-
"Topic :: Utilities :: Configuration Management",
25+
"Topic :: Utilities",
2626
"License :: OSI Approved :: MIT License",
2727
"Programming Language :: Python :: 3.10",
2828
"Programming Language :: Python :: 3.11",

0 commit comments

Comments
 (0)