File: setup.yml

package info (click to toggle)
utidylib 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204 kB
  • sloc: python: 446; makefile: 148
file content (77 lines) | stat: -rw-r--r-- 2,336 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Distribution

on: [push, pull_request]

jobs:
  setup:
    name: Build packages
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          persist-credentials: false
      - name: Setup Python
        uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
        with:
          python-version: '3.14'
      - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
        with:
          enable-cache: true
          cache-dependency-glob: ''
      - name: Install dependencies
        run: uv pip install --system -e .[dev]
      - name: build sdist
        run: uv build
      - name: twine
        run: uvx twine check dist/*
      - name: pydistcheck
        run: uvx pydistcheck --inspect dist/*
      - name: pyroma
        run: uvx pyroma dist/*.tar.gz
      - name: check-wheel-contents
        run: uvx check-wheel-contents dist/*.whl
      - name: check-manifest
        run: uvx check-manifest -v

      - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          path: dist/*
          name: dist

  release_pypi:
    if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
    runs-on: ubuntu-24.04
    name: Publish release to PyPI
    permissions:
      # this permission is mandatory for trusted publishing
      id-token: write
    needs:
      - setup
    steps:
      - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
      - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          name: dist
          path: dist
      - name: Publish package
        run: uv publish --trusted-publishing always

  release_github:
    runs-on: ubuntu-24.04
    name: Create release on GitHub
    permissions:
      contents: write
    needs:
      - setup
    if: startsWith(github.ref, 'refs/tags/')
    steps:
      - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
        with:
          name: dist
          path: dist
      - uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
        with:
          generateReleaseNotes: true
          artifacts: dist/*
permissions:
  contents: read