File: ci.yml

package info (click to toggle)
python-legacy-cgi 2.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 232 kB
  • sloc: python: 1,533; makefile: 3
file content (35 lines) | stat: -rw-r--r-- 961 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
35
name: CI
on: [push, pull_request]
jobs:
  build-and-test:
    name: Build and run unit tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install uv
        uses: astral-sh/setup-uv@v5
      - run: uv build
      - run: uv run --group dev pytest
      - name: "Upload Artifacts"
        uses: actions/upload-artifact@v4
        with:
          name: dist
          path: dist
  pypi-release:
    name: Upload release to PyPI
    needs: build-and-test
    runs-on: ubuntu-latest
    environment:
      name: release
      url: https://pypi.org/p/legacy-cgi
    permissions:
      id-token: write
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
    steps:
      - name: "Download Artifacts"
        uses: actions/download-artifact@v4
        with:
          name: dist
          path: dist
      - name: Publish package distributions to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1