File: release.yml

package info (click to toggle)
smart-open 7.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: python: 8,054; sh: 90; makefile: 14
file content (47 lines) | stat: -rw-r--r-- 1,278 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
name: Release to PyPI

on:
  release:
    types: [prereleased, released]

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: write  # softprops/action-gh-release
      id-token: write  # pypa/gh-action-pypi-publish
      issues: write # apexskier/github-release-commenter
      pull-requests: write # apexskier/github-release-commenter

    steps:
    - uses: actions/checkout@v5
      with:
        fetch-depth: 0 # fetch git tags for setuptools_scm (smart_open.__version__)

    - name: Set up Python
      uses: actions/setup-python@v6
      with:
        python-version: 3.x

    - name: Install dependencies
      run: |
        pip install --upgrade pip setuptools wheel build

    - name: Build package distributions
      run: |
        python -m build

    - name: Upload package distributions as release assets
      uses: softprops/action-gh-release@v2.4.1
      with:
        files: dist/*

    # https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@v1.13.0

    - uses: apexskier/github-release-commenter@v1.3.6
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        comment-template: |
          Released {release_link}