/
niceSOFT
/
python3-pytest
Обзор
Документация
Войти
/
niceSOFT
/
python3-pytest
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/deploy.yml
136 строк
4 KB
dependabot[bot]
build(deps): Bump hynek/build-and-inspect-python-package (#14848)
10 авг 2026, 08:59
Не верифицирован
10 авг 2026, 08:59
ecade5a
Код
Авторство
О чём код?
name: deploy on: workflow_dispatch: inputs: version: description: 'Release version' required: true default: '1.2.3' # Set permissions at the job level. permissions: {} jobs: package: runs-on: ubuntu-latest env: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST: ${{ github.event.inputs.version }} timeout-minutes: 10 # Required by attest-build-provenance-github. permissions: id-token: write attestations: write steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 persist-credentials: false - name: Build and Check Package uses: hynek/build-and-inspect-python-package@2abe76da66d0a6a4a227101f9348ee855797cfa5 with: attest-build-provenance-github: 'true' generate-gh-release-notes: needs: [package] runs-on: ubuntu-latest timeout-minutes: 30 permissions: contents: read steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 persist-credentials: false - name: Set up tox uses: ./.github/actions/setup-tox with: python-version: "3.13" - name: Generate release notes env: VERSION: ${{ github.event.inputs.version }} run: | tox -e generate-gh-release-notes -- "$VERSION" gh-release-notes.md - name: Upload release notes uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: release-notes path: gh-release-notes.md retention-days: 1 publish-to-pypi: if: github.repository == 'pytest-dev/pytest' # Need generate-gh-release-notes only for ordering. # Don't want to release to PyPI if generating GitHub release notes fails. needs: [package, generate-gh-release-notes] runs-on: ubuntu-latest environment: deploy timeout-minutes: 30 permissions: id-token: write steps: - name: Download Package uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: Packages path: dist - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 with: attestations: true push-tag: needs: [publish-to-pypi] runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: write steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 persist-credentials: true - name: Push tag env: VERSION: ${{ github.event.inputs.version }} run: | git config user.name "pytest bot" git config user.email "pytestbot@gmail.com" git tag --annotate --message=v"$VERSION" "$VERSION" ${{ github.sha }} git push origin "$VERSION" create-github-release: needs: [push-tag, generate-gh-release-notes] runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: write steps: - name: Download Package uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: Packages path: dist - name: Download release notes uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: release-notes path: . - name: Publish GitHub Release env: VERSION: ${{ github.event.inputs.version }} GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release create --notes-file gh-release-notes.md --verify-tag "$VERSION" dist/*