Projects STRLCPY kitsec-core Commits 37f29652
🤬
  • Create .github/workflows/python-publish.yml

    This commit adds a new GitHub Actions workflow to automatically upload a Python package to PyPI when a release is created.
  • Loading...
  • idrisschebak committed with GitHub 1 year ago
    37f29652
    1 parent 9f491570
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    .github/workflows/python-publish.yml
     1 +name: Upload Python Package
     2 + 
     3 +on:
     4 + release:
     5 + types: [published]
     6 + 
     7 +permissions:
     8 + contents: read
     9 + 
     10 +jobs:
     11 + deploy:
     12 + 
     13 + runs-on: ubuntu-latest
     14 + 
     15 + steps:
     16 + - uses: actions/checkout@v3
     17 + - name: Set up Python
     18 + uses: actions/setup-python@v3
     19 + with:
     20 + python-version: '3.x'
     21 + - name: Install dependencies
     22 + run: |
     23 + python -m pip install --upgrade pip
     24 + pip install build
     25 + - name: Build package
     26 + run: python -m build --sdist-dir=core/kitsec/dist --wheel-dir=core/kitsec/dist
     27 + - name: Publish package
     28 + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
     29 + with:
     30 + user: __token__
     31 + password: ${{ secrets.PYPI_API_TOKEN }}
     32 + dist-folder: core/kitsec/dist
     33 + 
Please wait...
Page is in error, reload to recover