Skip to content

Commit

Permalink
Cleanup, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysle committed May 15, 2024
1 parent e5c9c94 commit 09f0ac0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand All @@ -63,7 +63,6 @@ jobs:

upload-zipapp:
name: Upload zipapp to GitHub Release
# needs: pypi-publish
needs: create-release
runs-on: ubuntu-latest
permissions:
Expand All @@ -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
Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
branches:
- "main"
pull_request:
pull_request_target:
types:
- closed
schedule:
- cron: "0 8 * * *"
concurrency:
Expand Down Expand Up @@ -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/[email protected]

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
16 changes: 0 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 <scriptname>` ([#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))
Expand All @@ -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))

Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Version>: 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.

0 comments on commit 09f0ac0

Please sign in to comment.