mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-06-13 00:32:11 +00:00
Documentation and CI improvements (#39)
* README and workflow cleanup * Bump actions/cache → v5 * Bump actions/upload-artifact → v6 * Bump actions/download-artifact → v7
This commit is contained in:
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@@ -129,14 +129,14 @@ jobs:
|
|||||||
sha256sum -- yt.solver.*.js | tee SHA2-256SUMS
|
sha256sum -- yt.solver.*.js | tee SHA2-256SUMS
|
||||||
popd
|
popd
|
||||||
- name: Upload bundle hashes
|
- name: Upload bundle hashes
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: bundle-hashes
|
name: bundle-hashes
|
||||||
path: |
|
path: |
|
||||||
dist/SHA2-256SUMS
|
dist/SHA2-256SUMS
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
- name: Cache player JS files
|
- name: Cache player JS files
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
env:
|
env:
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
|
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
|
||||||
with:
|
with:
|
||||||
@@ -153,7 +153,7 @@ jobs:
|
|||||||
--allow-sys=uid \
|
--allow-sys=uid \
|
||||||
src/yt/solver/test/download.ts
|
src/yt/solver/test/download.ts
|
||||||
- name: Upload player JS artifact
|
- name: Upload player JS artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: player-js
|
name: player-js
|
||||||
path: |
|
path: |
|
||||||
@@ -195,7 +195,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pnpm run bundle
|
pnpm run bundle
|
||||||
- name: Download bundle hashes
|
- name: Download bundle hashes
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
name: bundle-hashes
|
name: bundle-hashes
|
||||||
@@ -209,9 +209,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
# minimum supported version
|
||||||
|
python-version: "3.10"
|
||||||
- name: Verify lockfile
|
- name: Verify lockfile
|
||||||
run: |
|
run: |
|
||||||
python ./check.py
|
python ./check.py
|
||||||
@@ -227,10 +228,12 @@ jobs:
|
|||||||
- name: Install Deno
|
- name: Install Deno
|
||||||
uses: denoland/setup-deno@v2
|
uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: "2.0.0" # minimum supported version
|
# minimum supported version
|
||||||
|
deno-version: "2.0.0"
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10" # minimum supported version
|
# minimum supported version
|
||||||
|
python-version: "3.10"
|
||||||
- name: Install Python requirements
|
- name: Install Python requirements
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -U build
|
python -m pip install -U build
|
||||||
@@ -250,7 +253,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
deno task bundle
|
deno task bundle
|
||||||
- name: Download bundle hashes
|
- name: Download bundle hashes
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
name: bundle-hashes
|
name: bundle-hashes
|
||||||
@@ -268,12 +271,13 @@ jobs:
|
|||||||
- name: Install Deno
|
- name: Install Deno
|
||||||
uses: denoland/setup-deno@v2
|
uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: "2.0.0" # minimum supported version
|
# minimum supported version
|
||||||
|
deno-version: "2.0.0"
|
||||||
- name: Install Deno requirements
|
- name: Install Deno requirements
|
||||||
run: |
|
run: |
|
||||||
deno install --frozen
|
deno install --frozen
|
||||||
- name: Download player JS artifact
|
- name: Download player JS artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: src/yt/solver/test/players
|
path: src/yt/solver/test/players
|
||||||
name: player-js
|
name: player-js
|
||||||
@@ -294,10 +298,12 @@ jobs:
|
|||||||
- name: Install Bun
|
- name: Install Bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: "1.0.31" # minimum supported version
|
# minimum supported version
|
||||||
|
bun-version: "1.0.31"
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10" # minimum supported version
|
# minimum supported version
|
||||||
|
python-version: "3.10"
|
||||||
- name: Install Python requirements
|
- name: Install Python requirements
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -U build
|
python -m pip install -U build
|
||||||
@@ -317,7 +323,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
bun --bun run bundle
|
bun --bun run bundle
|
||||||
- name: Download bundle hashes
|
- name: Download bundle hashes
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
name: bundle-hashes
|
name: bundle-hashes
|
||||||
@@ -335,12 +341,13 @@ jobs:
|
|||||||
- name: Install Bun
|
- name: Install Bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: "1.2.11" # XXX: We support 1.0.31, but test suite requires 1.2.11+
|
# XXX: We support 1.0.31, but test suite requires 1.2.11+
|
||||||
|
bun-version: "1.2.11"
|
||||||
- name: Install Bun requirements
|
- name: Install Bun requirements
|
||||||
run: |
|
run: |
|
||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
- name: Download player JS artifact
|
- name: Download player JS artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: src/yt/solver/test/players
|
path: src/yt/solver/test/players
|
||||||
name: player-js
|
name: player-js
|
||||||
@@ -359,10 +366,12 @@ jobs:
|
|||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: "20.0" # minimum supported version
|
# minimum supported version
|
||||||
|
node-version: "20.0"
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10" # minimum supported version
|
# minimum supported version
|
||||||
|
python-version: "3.10"
|
||||||
- name: Install Python requirements
|
- name: Install Python requirements
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -U build
|
python -m pip install -U build
|
||||||
@@ -382,7 +391,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm run bundle
|
npm run bundle
|
||||||
- name: Download bundle hashes
|
- name: Download bundle hashes
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
name: bundle-hashes
|
name: bundle-hashes
|
||||||
@@ -400,12 +409,13 @@ jobs:
|
|||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: "22.18" # XXX: We support 20.0, but test suite requires 22.18+
|
# XXX: We support 20.0, but test suite requires 22.18+
|
||||||
|
node-version: "22.18"
|
||||||
- name: Install Node requirements
|
- name: Install Node requirements
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
- name: Download player JS artifact
|
- name: Download player JS artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: src/yt/solver/test/players
|
path: src/yt/solver/test/players
|
||||||
name: player-js
|
name: player-js
|
||||||
|
|||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m build
|
python -m build
|
||||||
- name: Upload Python artifacts
|
- name: Upload Python artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: artifacts-py
|
name: artifacts-py
|
||||||
path: |
|
path: |
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
deno install --frozen
|
deno install --frozen
|
||||||
deno task bundle
|
deno task bundle
|
||||||
- name: Upload JavaScript artifacts
|
- name: Upload JavaScript artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: artifacts-js
|
name: artifacts-js
|
||||||
path: |
|
path: |
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
id-token: write # required for PyPI trusted publishing
|
id-token: write # required for PyPI trusted publishing
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
name: artifacts-py
|
name: artifacts-py
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
pattern: artifacts-*
|
pattern: artifacts-*
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -14,8 +14,8 @@ pip install -U yt-dlp-ejs
|
|||||||
|
|
||||||
The project provides lockfiles for every supported package manager.
|
The project provides lockfiles for every supported package manager.
|
||||||
|
|
||||||
If you only have Python and a JS runtime you may instead invoke `./hatch_build.py`,
|
If you only have Python and a JS runtime, then you may instead run `./hatch_build.py`.
|
||||||
which will transparently invoke one of the supported JS runtimes and run the build with it.
|
This will transparently invoke one of the supported JS runtimes for the build.
|
||||||
|
|
||||||
If you notice differences between different runtimes' builds
|
If you notice differences between different runtimes' builds
|
||||||
please open an issue [here](<https://github.com/yt-dlp/ejs/issues/new>).
|
please open an issue [here](<https://github.com/yt-dlp/ejs/issues/new>).
|
||||||
@@ -67,7 +67,8 @@ node --test
|
|||||||
## Upgrading packages
|
## Upgrading packages
|
||||||
|
|
||||||
When upgrading packages in package.json, all lockfiles must be updated simultaneously.
|
When upgrading packages in package.json, all lockfiles must be updated simultaneously.
|
||||||
To do this, run the follosing commands:
|
To do this, run the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Upgrade packages automatically (or manually adjust versions)
|
# Upgrade packages automatically (or manually adjust versions)
|
||||||
pnpm upgrade --latest
|
pnpm upgrade --latest
|
||||||
@@ -81,8 +82,11 @@ pnpm import
|
|||||||
bun pm migrate --force
|
bun pm migrate --force
|
||||||
|
|
||||||
# Make sure to use a deno with lockfile v4 (<2.3)
|
# Make sure to use a deno with lockfile v4 (<2.3)
|
||||||
deno install
|
deno install --lockfile-only
|
||||||
# Ensure that `deno.json` is the same as `package-lock.json`
|
|
||||||
|
# Ensure that `deno.json` is the same as `package-lock.json`.
|
||||||
|
# Note: you may need to manually update the `ADDITIONAL_PACKAGES_NODE`
|
||||||
|
# and/or `ADDITIONAL_PACKAGES_DENO` variables in `./check.py`.
|
||||||
python check.py
|
python check.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user