File: release.yml

package info (click to toggle)
python-auditwheel 6.6.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: python: 6,165; ansic: 304; cpp: 66; sh: 28; makefile: 25; f90: 12
file content (64 lines) | stat: -rw-r--r-- 1,872 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
name: Release

on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:
    # allow manual runs on branches without a PR
  release:
    types:
      - published

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

permissions: {}

jobs:
  dist:
    name: Build dist
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
    - name: Checkout
      uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
      with:
        fetch-depth: 0  # required for setuptools_scm to find tags
        persist-credentials: false
    - name: Build dist
      # This action builds the distributions and uploads them as an artifact named "Packages",
      # which is later downloaded in the `publish` job via actions/download-artifact.
      uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0

  publish:
    name: Publish to PyPI
    needs: [dist]
    runs-on: ubuntu-latest
    if: github.event_name == 'release' && github.event.action == 'published'
    environment:
      name: pypi
      url: https://pypi.org/p/auditwheel
    permissions:
      attestations: write  # for attestation generation
      id-token: write  # for trusted publishing

    steps:
    - name: Download dist artefacts
      uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
      with:
        name: Packages
        path: dist

    - name: Generate artifact attestation for sdist and wheel
      uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
      with:
        subject-path: "dist/auditwheel-*"

    - name: Publish to PyPI
      uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
      with:
        attestations: true