File: release.yml

package info (click to toggle)
python-pygraphviz 1.14-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 764 kB
  • sloc: ansic: 5,100; python: 2,669; makefile: 64
file content (34 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (2)
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
name: Build Wheel and Release
on:
  push:
    tags:
      - pygraphviz-*

jobs:
  pypi-publish:
    name: upload release to PyPI
    if: github.repository_owner == 'pygraphviz' && startsWith(github.ref, 'refs/tags/pygraphviz-') && github.actor == 'jarrodmillman' && always()
    runs-on: ubuntu-latest
    # Specifying a GitHub environment is optional, but strongly encouraged
    environment: release
    permissions:
      # IMPORTANT: this permission is mandatory for trusted publishing
      id-token: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: actions/setup-python@v5
        name: Install Python
        with:
          python-version: "3.11"

      - name: Build wheels
        run: |
          git clean -fxd
          pip install -U build twine wheel
          python -m build --sdist

      - name: Publish package distributions to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1