Skip to content

Commit

Permalink
use gh action for releasing to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesZh committed Dec 28, 2024
1 parent d9f861d commit dd94532
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
release:
types: [published]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Build
run: |
python3 -m pip install --user build
python3 -m build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
name: Publish
runs-on: ubuntu-latest
needs: [build]
permissions:
id-token: write
environment:
name: release
url: https://pypi.org/p/yt-dlp-danmaku
steps:
- name: Download
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit dd94532

Please sign in to comment.