mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-06-13 08:42:29 +00:00
* Bump actions/cache v5.0.4 => v5.0.5 * Bump actions/checkout v6.0.2 => v6.0.3 * Bump actions/setup-node v6.3.0 => v6.4.0 * Bump actions/upload-artifact v7.0.0 => v7.0.1 * Bump astral-sh/ruff-action v3.6.1 => v4.0.0 * Bump denoland/setup-deno v2.0.3 => v2.0.4 * Bump pnpm/action-setup v5.0.0 => v6.0.8 * Bump pypa/gh-action-pypi-publish v1.13.0 => v1.14.0 * Bump zizmorcore/zizmor-action v0.5.2 => v0.5.6
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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
fetch-depth: 0 # Needed for hatch-vcs versioning
|
|
persist-credentials: false
|
|
|
|
- uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
|
|
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
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@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
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
|