-
Notifications
You must be signed in to change notification settings - Fork 121
56 lines (44 loc) · 1.69 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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: Build & Validate Bundles
run: |
python setup.py sdist bdist_wheel
python -m twine check dist/*
- name: Build Changelog
run: python -m towncrier --yes
- name: Upload to PyPI
env:
TWINE_PASSWORD: ${{ secrets.TWINETOKEN }}
run: python -m twine upload dist/* --disable-progress-bar -u __token__ --non-interactive
- name: Create Git Tag
run: git tag v$(python setup.py --version)
- name: Bump version, and commit changes back into the repository
run: |
VERSION=$(python setup.py --version)
python setup.py bump --build
git config user.email "github-actions@github.com"
git config user.name "github-actions"
git add src CHANGELOG.rst
git status
git commit -m "Release v$VERSION"
git push && git push --tags
gh release create $VERSION -n "Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst) for more details"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}