/
niceSOFT
/
python3-pytest
Обзор
Документация
Войти
/
niceSOFT
/
python3-pytest
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2.0.dev0
.github/workflows/deploy.yml
101 строка
3 KB
dependabot[bot]
build(deps): Bump hynek/build-and-inspect-python-package (#11877)
29 янв 2024, 16:42
Не верифицирован
29 янв 2024, 16:42
c0dfc45
Код
Авторство
О чём код?
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: ${{ github.event.inputs.version }} timeout-minutes: 10 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - name: Build and Check Package uses: hynek/build-and-inspect-python-package@v2.0.1 deploy: if: github.repository == 'pytest-dev/pytest' needs: [package] runs-on: ubuntu-latest environment: deploy timeout-minutes: 30 permissions: id-token: write contents: write steps: - uses: actions/checkout@v4 - name: Download Package uses: actions/download-artifact@v4 with: name: Packages path: dist - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@v1.8.11 - name: Push tag run: | git config user.name "pytest bot" git config user.email "pytestbot@gmail.com" git tag --annotate --message=v${{ github.event.inputs.version }} ${{ github.event.inputs.version }} ${{ github.sha }} git push origin ${{ github.event.inputs.version }} release-notes: # todo: generate the content in the build job # the goal being of using a github action script to push the release data # after success instead of creating a complete python/tox env needs: [deploy] runs-on: ubuntu-latest timeout-minutes: 30 permissions: contents: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - name: Download Package uses: actions/download-artifact@v4 with: name: Packages path: dist - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install tox run: | python -m pip install --upgrade pip pip install --upgrade tox - name: Generate release notes run: | sudo apt-get install pandoc tox -e generate-gh-release-notes -- ${{ github.event.inputs.version }} scripts/latest-release-notes.md - name: Publish GitHub Release uses: softprops/action-gh-release@v1 with: body_path: scripts/latest-release-notes.md files: dist/* tag_name: ${{ github.event.inputs.version }}