Release 2024.11.18
[yt-dlp3.git] / .github / workflows / release-master.yml
blob78445e417edf622e535640f4db233176d30061b4
1 name: Release (master)
2 on:
3   push:
4     branches:
5       - master
6     paths:
7       - "yt_dlp/**.py"
8       - "!yt_dlp/version.py"
9       - "bundle/*.py"
10       - "pyproject.toml"
11       - "Makefile"
12       - ".github/workflows/build.yml"
13 concurrency:
14   group: release-master
15 permissions:
16   contents: read
18 jobs:
19   release:
20     if: vars.BUILD_MASTER != ''
21     uses: ./.github/workflows/release.yml
22     with:
23       prerelease: true
24       source: master
25     permissions:
26       contents: write
27       packages: write  # For package cache
28       actions: write  # For cleaning up cache
29       id-token: write  # mandatory for trusted publishing
30     secrets: inherit
32   publish_pypi:
33     needs: [release]
34     if: vars.MASTER_PYPI_PROJECT != ''
35     runs-on: ubuntu-latest
36     permissions:
37       id-token: write  # mandatory for trusted publishing
38     steps:
39       - name: Download artifacts
40         uses: actions/download-artifact@v4
41         with:
42           path: dist
43           name: build-pypi
44       - name: Publish to PyPI
45         uses: pypa/gh-action-pypi-publish@release/v1
46         with:
47           verbose: true