Skip to content

Commit

Permalink
[build] Bump actions/upload-artifact to v4 and adjust workflows
Browse files Browse the repository at this point in the history
Authored by: bashonly
  • Loading branch information
bashonly committed Feb 11, 2024
1 parent 0af882d commit 107dec1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 15 deletions.
46 changes: 32 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,15 @@ jobs:
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: |
yt-dlp
yt-dlp.tar.gz
yt-dlp_linux
yt-dlp_linux.zip
compression-level: 0

linux_arm:
needs: process
Expand Down Expand Up @@ -224,10 +226,12 @@ jobs:
fi
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}-${{ matrix.architecture }}
path: | # run-on-arch-action designates armv7l as armv7
repo/dist/yt-dlp_linux_${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }}
compression-level: 0

macos:
needs: process
Expand Down Expand Up @@ -266,11 +270,13 @@ jobs:
[[ "$version" != "$downgraded_version" ]]
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: |
dist/yt-dlp_macos
dist/yt-dlp_macos.zip
compression-level: 0

macos_legacy:
needs: process
Expand Down Expand Up @@ -317,10 +323,12 @@ jobs:
[[ "$version" != "$downgraded_version" ]]
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: |
dist/yt-dlp_macos_legacy
compression-level: 0

windows:
needs: process
Expand Down Expand Up @@ -364,12 +372,14 @@ jobs:
}
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: |
dist/yt-dlp.exe
dist/yt-dlp_min.exe
dist/yt-dlp_win.zip
compression-level: 0

windows32:
needs: process
Expand Down Expand Up @@ -410,10 +420,12 @@ jobs:
}
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: |
dist/yt-dlp_x86.exe
compression-level: 0

meta_files:
if: inputs.meta_files && always() && !cancelled()
Expand All @@ -427,17 +439,21 @@ jobs:
- windows32
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: artifact
pattern: artifact-*
merge-multiple: true

- name: Make SHA2-SUMS files
run: |
cd ./artifact/
sha256sum * > ../SHA2-256SUMS
sha512sum * > ../SHA2-512SUMS
cd ./artifact
sha256sum * > ./SHA2-256SUMS
sha512sum * > ./SHA2-512SUMS
- name: Make Update spec
run: |
cat >> _update_spec << EOF
cat >> ./artifact/_update_spec << EOF
# This file is used for regulating self-update
lock 2022.08.18.36 .+ Python 3\.6
lock 2023.11.16 (?!win_x86_exe).+ Python 3\.7
Expand All @@ -456,14 +472,16 @@ jobs:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
if: env.GPG_SIGNING_KEY != ''
run: |
cd ./artifact
gpg --batch --import <<< "${{ secrets.GPG_SIGNING_KEY }}"
for signfile in ./SHA*SUMS; do
gpg --batch --detach-sign "$signfile"
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: |
SHA*SUMS*
_update_spec
artifact/
compression-level: 0
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build-artifact
path: artifact
- uses: actions/setup-python@v5
with:
python-version: "3.10"
Expand Down

0 comments on commit 107dec1

Please sign in to comment.