Add GitHub Packages publishing workflow and documentation

This commit is contained in:
w4nn4d13
2026-04-06 22:48:20 +05:30
parent 5354368e49
commit 5248e04d0a
2 changed files with 115 additions and 0 deletions
@@ -0,0 +1,37 @@
name: Publish to GitHub Packages
on:
release:
types: [created, published]
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build distribution packages
run: python -m build
- name: Publish to GitHub Packages
run: |
python -m twine upload dist/* \
--repository-url https://python.pkg.github.com/${{ github.repository_owner }} \
--username ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--verbose