mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-06-13 00:32:11 +00:00
* Add required versions to README * Bump CI/CD runtimes to new minimum supported versions
111 lines
3.0 KiB
YAML
111 lines
3.0 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
permissions: {}
|
|
|
|
env:
|
|
GH_TELEMETRY: "false"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build artifacts
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0 # Needed for hatch-vcs versioning
|
|
persist-credentials: false
|
|
|
|
- uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
|
|
with:
|
|
deno-version: 3fbb1daddbc9333cddf0d8c0735811717dd70f7a # v2.6.3
|
|
cache: false
|
|
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.14"
|
|
|
|
- name: Install Python requirements
|
|
run: |
|
|
python -m pip install -U build
|
|
|
|
- name: Build Python artifacts
|
|
run: |
|
|
python -m build
|
|
|
|
- name: Upload Python artifacts
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: artifacts-py
|
|
path: |
|
|
dist/yt_dlp_ejs-*.whl
|
|
dist/yt_dlp_ejs-*.tar.gz
|
|
compression-level: 0
|
|
|
|
- name: Build JavaScript artifacts
|
|
run: |
|
|
deno install --frozen
|
|
deno task bundle
|
|
|
|
- name: Upload JavaScript artifacts
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: artifacts-js
|
|
path: |
|
|
dist/yt.solver.*.js
|
|
compression-level: 0
|
|
|
|
publish_pypi:
|
|
name: Publish to PyPI
|
|
needs: [build]
|
|
if: github.repository == 'yt-dlp/ejs'
|
|
permissions:
|
|
id-token: write # Needed for PyPI trusted publishing
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
path: dist
|
|
name: artifacts-py
|
|
|
|
- name: Publish to PyPI
|
|
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
|
with:
|
|
verbose: true
|
|
|
|
release:
|
|
name: Create GitHub release
|
|
needs: [build, publish_pypi]
|
|
if: always() && !failure() && !cancelled()
|
|
permissions:
|
|
contents: write # Needed by gh to publish release to Github
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
path: dist
|
|
pattern: artifacts-*
|
|
merge-multiple: true
|
|
|
|
- name: Create GitHub Release
|
|
env:
|
|
TAG: ${{ github.ref_name }}
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh release create "${TAG}" \
|
|
--title "yt-dlp-ejs ${TAG}" \
|
|
--generate-notes \
|
|
--verify-tag \
|
|
dist/yt.solver.*.js \
|
|
dist/yt_dlp_ejs-*.whl \
|
|
dist/yt_dlp_ejs-*.tar.gz
|