/
githubmirror
/
tzdata
Обзор
Документация
Войти
/
githubmirror
/
tzdata
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/publish.yml
107 строк
3 KB
Stan Ulbrych
Stop testing 3.8 and 3.9, test 3.15 and PyPy3 (#148)
04 авг 2026, 12:44
Не верифицирован
04 авг 2026, 12:44
6c7fa78
Код
Авторство
О чём код?
# This workflow is triggered in two ways: # # 1. When a tag is created, the workflow will upload the package to # test.pypi.org. # 2. When a release is made, the workflow will upload the package to pypi.org. # # It is done this way until PyPI has draft reviews, to allow for a two-stage # upload with a chance for manual intervention before the final publication. name: Upload package on: push: pull_request: release: types: - published workflow_dispatch: permissions: contents: read env: FORCE_COLOR: 1 jobs: build-package: name: Build & verify package runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0 test-package: name: Test package if: | github.event.repository.fork == false && ( (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event.action == 'published' ) needs: build-package uses: ./.github/workflows/tests.yml # Publish to TestPyPI for every tag. release-test-pypi: name: Publish to TestPyPI if: | github.event.repository.fork == false && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest needs: test-package environment: name: release url: >- https://test.pypi.org/project/tzdata/${{ github.event.release.tag_name }} permissions: id-token: write steps: - name: Download packages built by build-and-inspect-python-package uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: Packages path: dist - name: Publish to Test PyPI uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 with: repository-url: https://test.pypi.org/legacy/ release-pypi: name: Publish to PyPI # Only run for published releases. if: | github.event.repository.fork == false && github.event.action == 'published' runs-on: ubuntu-latest needs: test-package environment: name: release url: >- https://pypi.org/project/tzdata/${{ github.event.release.tag_name }} permissions: id-token: write steps: - name: Download packages built by build-and-inspect-python-package uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: Packages path: dist - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0