Authored by: bashonly
This commit is contained in:
bashonly 2024-10-31 16:45:10 -05:00
parent 1c868cde15
commit c26864da13
No known key found for this signature in database
GPG key ID: 783F096F253D15B0
4 changed files with 16 additions and 19 deletions

View file

@ -504,7 +504,8 @@ jobs:
- windows32
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifact
pattern: build-bin-*

View file

@ -36,7 +36,8 @@ jobs:
permissions:
id-token: write # mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
name: build-pypi

View file

@ -49,7 +49,8 @@ jobs:
permissions:
id-token: write # mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
name: build-pypi

View file

@ -18,10 +18,6 @@ on:
required: false
default: true
type: boolean
manual_dispatch:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
source:
@ -51,10 +47,6 @@ on:
description: Pre-release
default: false
type: boolean
manual_dispatch:
description: Manual dispatch (do not toggle)
default: true
type: boolean
permissions:
contents: read
@ -275,6 +267,8 @@ jobs:
sed -i -E '0,/(name = ")[^"]+(")/s//\1${{ env.pypi_project }}\2/' pyproject.toml
- name: Build
env:
event_name: ${{ github.event_name }}
run: |
rm -rf dist/*
make pypi-files
@ -285,20 +279,20 @@ jobs:
python devscripts/set-variant.py pip -M "You installed yt-dlp with pip or using the wheel from PyPi; Use that to update"
make clean-cache
python -m build --no-isolation .
- name: Make SHA2-SUMS files
if: ${{ !inputs.manual_dispatch }}
run: |
cd ./dist/
# make sure SHA sums are also printed to stdout
# print SHA sums to stdout
sha256sum -- * | tee SHA2-256SUMS
# also print as permanent annotations to the summary page
while read -r shasum; do
echo "::notice title=${shasum##* }::sha256: ${shasum% *}"
done < SHA2-256SUMS
# if we're publishing from this workflow, we need to remove SHA2-256SUMS from ./dist/ now
if [[ "${event_name}" == "workflow_dispatch" ]]; then
rm SHA2-256SUMS
fi
- name: Upload PyPI artifacts
if: ${{ !inputs.manual_dispatch }}
- name: Upload artifacts
if: github.event_name != 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: build-pypi
@ -307,7 +301,7 @@ jobs:
compression-level: 0
- name: Publish to PyPI
if: inputs.manual_dispatch
if: github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true