diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c59c65e..03dbddd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ on: push: - branches: - - main + tags: + - 'v*.*.*-*' name: 🚀 Publish to PyPI jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..069ee65 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +on: + push: + tags: + - 'v*.*.*-*' + +name: 🚀 Release on GitHub +jobs: + release: + name: 🎉 Release on GitHub + runs-on: ubuntu-latest + steps: + - name: 🚚 Checkout repository + uses: actions/checkout@v4 + + - name: 🐍 Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: 📦 Install dependencies + run: | + pip install -r requirements.txt + + - name: 🛠️ Build package + run: python3 -m build + + - name: "✏️ Generate release changelog" + id: gen-changelog + uses: janheinrichmerker/action-github-changelog-generator@v2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: 🚀 Publish release to GitHub + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + name: ${{github.event.repository.name}}-${{github.ref_name}} + body: ${{ steps.gen-changelog.outputs.changelog }} + files: dist/* + draft: false + prerelease: false + make_latest: true + \ No newline at end of file diff --git a/README.md b/README.md index 5141175..c8e2cdb 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,15 @@ * [Node.js](https://nodejs.org/en/download/) ### **🧩 Python Dependencies** -* [pytubefix](https://pypi.org/project/pytubefix/) -* [ffmpy](https://pypi.org/project/ffmpy/) -* [mutagen](https://pypi.org/project/mutagen/) -* [tabulate](https://pypi.org/project/tabulate/) -* [tqdm](https://pypi.org/project/tqdm/) -* [appdirs](https://pypi.org/project/appdirs/) -* [requests](https://pypi.org/project/requests/) -* [setuptools](https://pypi.org/project/setuptools/) +* [pytubefix](https://pypi.org/project/pytubefix/), +[ffmpy](https://pypi.org/project/ffmpy/), +[mutagen](https://pypi.org/project/mutagen/), +[tabulate](https://pypi.org/project/tabulate/), +[tqdm](https://pypi.org/project/tqdm/), +[appdirs](https://pypi.org/project/appdirs/), +[requests](https://pypi.org/project/requests/), +[rich](https://pypi.org/project/rich/), +[setuptools](https://pypi.org/project/setuptools/) ### **🛠️ Installation**