Release #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: workflow_dispatch | |
name: Release | |
permissions: {} | |
jobs: | |
release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
if: contains('["Legorooj", "bwoodsend", "rokm"]', github.event.actor) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Log into the gh CLI | |
run: echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
- name: Install Dependencies | |
run: python -m pip install --upgrade -r requirements-release.txt | |
- name: Bump version | |
run: python setup.py bump --build | |
- name: Build Changelog | |
run: python -m towncrier --yes | |
- name: Build & Validate Bundles | |
run: | | |
python setup.py sdist bdist_wheel | |
python -m twine check dist/* | |
- name: Upload to PyPI | |
env: | |
TWINE_PASSWORD: ${{ secrets.TWINETOKEN }} | |
run: python -m twine upload dist/* --disable-progress-bar -u __token__ --non-interactive | |
- name: Commit changes and publish to GitHub | |
run: | | |
VERSION="v$(python setup.py --version)" | |
git config user.email "github-actions@github.com" | |
git config user.name "github-actions" | |
git add _pyinstaller_hooks_contrib CHANGELOG.rst | |
git status | |
git commit -m "Release $VERSION" | |
git tag "$VERSION" | |
git push && git push --tags | |
gh release create $VERSION -n "Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/$VERSION/CHANGELOG.rst) for more details" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |