File: build-release.yml

package info (click to toggle)
python-certbot-dns-hetzner-cloud 1.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168 kB
  • sloc: python: 317; makefile: 8
file content (56 lines) | stat: -rw-r--r-- 1,227 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
name: Build Release

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+'

permissions:
  contents: read

jobs:
  test-with-coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
          cache: 'pip'

      - name: "Install Dependencies"
        run: |
          python -m pip install -U pip
          pip install -e .[dev]

      - name: "Test with coverage"
        run: |
          pytest --cov --cov-branch --cov-report=xml

      - name: "Upload coverage"
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

  release-build:
    needs: test-with-coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
          cache: 'pip'

      - name: "Build release"
        run: |
          python -m pip install build
          python -m build

      - name: "Upload release artifacts"
        uses: actions/upload-artifact@v4
        with:
          name: release-dists
          path: dist/**
          if-no-files-found: error
          retention-days: 1