File: release.yml

package info (click to toggle)
python-gitlab 1%3A8.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,884 kB
  • sloc: python: 25,823; makefile: 171; ruby: 27; javascript: 3
file content (38 lines) | stat: -rw-r--r-- 1,200 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
name: Release

on:
  schedule:
    - cron: '0 0 28 * *'  # Monthly auto-release
  workflow_dispatch:      # Manual trigger for quick fixes

jobs:
  release:
    if: github.repository == 'python-gitlab/python-gitlab'
    runs-on: ubuntu-latest
    concurrency: release
    permissions:
      id-token: write
    environment: pypi.org
    steps:
    - uses: actions/checkout@v6.0.2
      with:
        fetch-depth: 0
        token: ${{ secrets.RELEASE_GITHUB_TOKEN }}

    - name: Python Semantic Release
      id: release
      uses: python-semantic-release/python-semantic-release@v10.5.3
      with:
        github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }}

    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
      # See https://github.com/actions/runner/issues/1173
      if: steps.release.outputs.released == 'true'

    - name: Publish package distributions to GitHub Releases
      uses: python-semantic-release/publish-action@v10.5.3
      if: steps.release.outputs.released == 'true'
      with:
        github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }}