File: deploy.yml

package info (click to toggle)
pytest-django 4.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 640 kB
  • sloc: python: 4,176; makefile: 30; sh: 17
file content (43 lines) | stat: -rw-r--r-- 1,010 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
name: deploy

on:
  push:
    tags:
      - "*"

# Set permissions at the job level.
permissions: {}

jobs:
  package:
    runs-on: ubuntu-24.04
    timeout-minutes: 10

    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false

      - name: Build and Check Package
        uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516  # v2.14.0

  deploy:
    if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest-django'
    needs: [package]
    runs-on: ubuntu-24.04
    environment: deploy
    timeout-minutes: 15
    permissions:
      contents: read
      # For trusted publishing.
      id-token: write

    steps:
      - name: Download Package
        uses: actions/download-artifact@v7
        with:
          name: Packages
          path: dist

      - name: Publish package
        uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0