From 09f0ac0e05d197564504968c0ffec6f17df01966 Mon Sep 17 00:00:00 2001 From: chrysle <96722107+chrysle@users.noreply.github.com> Date: Wed, 15 May 2024 16:54:29 +0200 Subject: [PATCH] Cleanup, docs --- .github/workflows/bump-changelog.yml | 2 +- .github/workflows/release.yml | 7 ++- .github/workflows/tests.yml | 66 ---------------------------- CHANGELOG.md | 16 ------- CONTRIBUTING.md | 5 ++- 5 files changed, 7 insertions(+), 89 deletions(-) diff --git a/.github/workflows/bump-changelog.yml b/.github/workflows/bump-changelog.yml index 0d7331eaed..bdd6aa6eed 100644 --- a/.github/workflows/bump-changelog.yml +++ b/.github/workflows/bump-changelog.yml @@ -41,7 +41,7 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' - git commit -am "Bump changelog for $RELEASE_VERSION" + git commit -am "$RELEASE_VERSION: Bump changelog" git fetch origin git push origin $PR_BRANCH - name: Create pull request diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e26c39813..6e9e003238 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: create-release: name: Create a release on GitHub's UI - # needs: pypi-publish + needs: pypi-publish runs-on: ubuntu-latest outputs: release-tag: ${{ steps.get-version.outputs.version }} @@ -53,7 +53,7 @@ jobs: env: TITLE: ${{ github.event.pull_request.title }} run: | - echo "version=${TITLE##bump changelog for }" >> "$GITHUB_OUTPUT" + echo "version=${TITLE/: [[:alnum:]]*} }" >> "$GITHUB_OUTPUT" - name: Create release uses: ncipollo/release-action@v1 with: @@ -63,7 +63,6 @@ jobs: upload-zipapp: name: Upload zipapp to GitHub Release - # needs: pypi-publish needs: create-release runs-on: ubuntu-latest permissions: @@ -73,7 +72,7 @@ jobs: with: name: pipx.pyz workflow: tests.yml - workflow_conclusion: "" + workflow_conclusion: success pr: ${{ github.event.pull_request.number }} - name: Upload to release uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 55a86e1c07..71450e74c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,9 +6,6 @@ on: branches: - "main" pull_request: - pull_request_target: - types: - - closed schedule: - cron: "0 8 * * *" concurrency: @@ -88,66 +85,3 @@ jobs: name: pipx.pyz path: pipx.pyz retention-days: 3 - - create-release: - name: >- - Create a release on GitHub's UI - which triggers the actual release - runs-on: ubuntu-latest - permissions: - contents: write - if: >- - github.event.pull_request.merged == true - && contains(github.event.pull_request.labels.*.name, 'release-version') - steps: - - uses: actions/checkout@v4 - - name: Extract version to be released - env: - TITLE: ${{ github.event.pull_request.title }} - run: | - echo "VERSION=${TITLE##bump changelog for }" >> "$GITHUB_ENV" - - name: Create release - uses: ncipollo/release-action@v1 - with: - generateReleaseNotes: true - tag: "${{ env.VERSION }}" - commit: ${{ github.event.pull_request.merge_commit_sha }} - - pypi-publish: - name: Publish pipx to PyPI on release - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - needs: [tests, man, zipapp] - runs-on: ubuntu-latest - environment: - name: release - url: https://pypi.org/p/pipx - permissions: - id-token: write - steps: - - name: Checkout ${{ github.ref }} - uses: actions/checkout@v4 - - name: Set up Python ${{ env.default-python }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.default-python }} - cache: "pip" - - name: Install nox - run: pip install nox - - name: Build sdist and wheel - run: nox --error-on-missing-interpreters --non-interactive --session build - - name: Publish to PyPi - uses: pypa/gh-action-pypi-publish@v1.8.14 - - upload-zipapp: - name: Upload zipapp to GitHub Release on release - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - needs: [tests, man, zipapp] - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v4 - with: - name: pipx.pyz - - name: Upload to release - uses: softprops/action-gh-release@v2 - with: - files: pipx.pyz diff --git a/CHANGELOG.md b/CHANGELOG.md index 84eca5be77..2422186f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) for keeping t ### Features -<<<<<<< HEAD - Add `--global` option to `pipx` commands. - This will run the action in a global scope and affect environment for all system users. ([#754](https://github.com/pypa/pipx/issues/754)) - Add a `--fetch-missing-python` flag to all commands that accept a `--python` flag. @@ -24,23 +23,11 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) for keeping t - They were leading to a lot of issues with Windows sandboxing and spaces in shebangs on MacOS. ([#1257](https://github.com/pypa/pipx/issues/1257)) - Add `--install` option to `pipx upgrade` command. - This will install the package given as argument if it is not already installed. ([#1262](https://github.com/pypa/pipx/issues/1262)) -======= -- Add a `--fetch-missing-python` flag to all commands that accept a `--python` flag. - - When combined, this will automatically download a standalone copy of the requested python version if it's not already available on the user's system. ([#1242](https://github.com/pypa/pipx/issues/1242)) -- Add commands to list and prune standalone interpreters ([#1248](https://github.com/pypa/pipx/issues/1248)) -- Add `--install` option to `pipx upgrade` command. - - This will install the package given as argument if it is not already installed. ([#1262](https://github.com/pypa/pipx/issues/1262)) ->>>>>>> Bump changelog for 1.0.0 (#2) ### Bugfixes - Correctly resolve home directory in pipx directory environment variables. ([#94](https://github.com/pypa/pipx/issues/94)) -<<<<<<< HEAD - Pass through `pip` arguments when upgrading shared libraries. ([#964](https://github.com/pypa/pipx/issues/964)) -======= ->>>>>>> Bump changelog for 1.0.0 (#2) - Fix installation issues when files in the working directory interfere with venv creation process. ([#1091](https://github.com/pypa/pipx/issues/1091)) - Report correct filename in tracebacks with `pipx run ` ([#1191](https://github.com/pypa/pipx/issues/1191)) - Let self-managed pipx uninstall itself on windows again. ([#1203](https://github.com/pypa/pipx/issues/1203)) @@ -54,7 +41,6 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) for keeping t - Update the example for running scripts with dependencies. ([#1227](https://github.com/pypa/pipx/issues/1227)) - Update the docs for package developers on the use of configuration using pyproject.toml ([#1229](https://github.com/pypa/pipx/issues/1229)) - Add installation instructions for Fedora ([#1239](https://github.com/pypa/pipx/issues/1239)) -<<<<<<< HEAD - Update the examples for installation from local dir ([#1277](https://github.com/pypa/pipx/issues/1277)) - Fix inconsistent wording in `pipx install` command description. ([#1307](https://github.com/pypa/pipx/issues/1307)) @@ -65,8 +51,6 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) for keeping t ### Misc - [#1296](https://github.com/pypa/pipx/issues/1296) -======= ->>>>>>> Bump changelog for 1.0.0 (#2) ## [1.4.3](https://github.com/pypa/pipx/tree/1.4.3) - 2024-01-16 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b94854bace..7200e20dc2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -221,10 +221,11 @@ nox -s watch_docs ## Releasing New `pipx` Versions To release a new version, manually run the `bump-changelog` action under the *"Actions"* tab, passing it the version to -be released. Then, simply create a "published" release on GitHub. This will trigger GitHub workflows that publish: +be released. This will create a pull request updating the changelog for the upcoming version, with the `release-version` label. Attaching this label to any pull request of which the title follows the format `: Description` and merging it will trigger GitHub workflows that publish: - the pipx version to PyPI, -- the documentation to readthedocs, +- the documentation to ReadTheDocs, +- a GitHub release - the `zipapp` to the GitHub release created. No need for any other pre or post publish steps.