summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: dea5d358f7bfd80d10114d8ae7086f8e029e0948 (plain)
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
name: Release to PyPI
on:
  push:
    tags: ["*"]

jobs:
  release:
    runs-on: ubuntu-22.04
    environment:
      name: release
      url: https://pypi.org/p/tox
    permissions:
      id-token: write
    steps:
      - name: Setup python to build package
        uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - name: Install build
        run: python -m pip install build
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Build package
        run: pyproject-build -s -w . -o dist
      - name: Publish to PyPI
        uses: pypa/gh-action-pypi-publish@v1.8.5