File: publish.yml

package info (click to toggle)
python-xmltodict 1.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 220 kB
  • sloc: python: 1,305; makefile: 9
file content (44 lines) | stat: -rw-r--r-- 982 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
name: Publish to PyPI

on:
  release:
    types: [published]
  workflow_dispatch: {}

permissions:
  id-token: write
  contents: write

jobs:
  build-and-publish:
    name: Build and publish python package
    runs-on: ubuntu-latest
    environment:
      name: pypi-publish
      url: https://pypi.org/p/xmltodict
    steps:
      - uses: actions/checkout@v5

      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.x'

      - name: Install build backend
        run: |
          python -m pip install --upgrade pip
          python -m pip install build

      - name: Build sdist and wheel
        run: |
          python -m build --sdist --wheel --outdir dist/

      - name: Upload sdist and wheel as release assets
        uses: softprops/action-gh-release@v2
        with:
          files: dist/*

      - name: Publish to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          print-hash: true