diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d062d7720d..c18843cfcb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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-* diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 1ed94d7ab8..95dbc51729 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -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 diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index a75ce591c6..89f064b4a1 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7d018c207..a744a78bf4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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