-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Publish | ||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel flake8 | ||
- name: Build | ||
run: | | ||
make build | ||
- name: Unit Tests | ||
run: | | ||
cd build/dist/pytz/tests | ||
python test_lazy.py -vv | ||
python test_tzinfo.py -vv | ||
- name: Documentation Tests | ||
run: | | ||
cd build/dist/pytz/tests | ||
python test_docs.py -vv | ||
- name: zdump Tests | ||
run: | | ||
python gen_tests.py | ||
python test_zdump.py -vv | ||
- name: Build distribution | ||
run: | | ||
make clean dist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./build/tarballs | ||
|
||
pypi-publish: | ||
needs: ['build'] | ||
environment: 'publish' | ||
|
||
name: upload release to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages_dir: artifact/ | ||
|
||
|
||
|