From b0c8041366300bf733e52dc673668e42ad3e3ed8 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Sun, 8 Jun 2025 16:47:48 +0100 Subject: [PATCH] build and publish wheel --- .github/workflows/prepare-release.yml | 9 +++++---- CONTRIBUTING.md | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 3727062..ab1a578 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -24,6 +24,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + pip install build pip install twine pip install coverage pip install pytest @@ -41,14 +42,14 @@ jobs: - name: "✏️ Generate release changelog" uses: heinrichreimer/github-changelog-generator-action@v2.3 with: - token: ${{ secrets.GITHUB_TOKEN }} - + token: ${{ secrets.GITHUB_TOKEN }} + - name: Check commit has been updated run: | git diff - name: Build package - run: python setup.py sdist --formats=gztar,zip + run: python -m build - name: Upload binaries to release uses: xresloader/upload-to-github-release@v1 @@ -64,7 +65,7 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "github-actions[bot]" git commit -m "Bump version to ${{ steps.latest_prerelease.outputs.tag_name }}" -a - + - name: Push changes uses: ad-m/github-push-action@v0.6.0 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1bde63a..c6e2bde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Please note we have a code of conduct, please follow it in all your interactions 2. Increase the version number in the `mdutils/doc/source/config.py` file. 3. Increase the version number in the `mdutils/setup.py` file. 3. Increase the version number in the `mdutils/pyproject.toml` file. -4. Increate the version number in the `.github_changelog_generator` file. +4. Increase the version number in the `.github_changelog_generator` file. 5. Run `github_changelog_generator -u didix21 -p mdutils`. -6. Run `python setup.py sdist --formats=gztar,zip`. +6. Run `python -m build`. 7. Upload package to pypi: `twine upload dist/*`.