mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Create Workflow to Publish Application to (test) PyPI
This commit is contained in:
parent
34296031c4
commit
ee3eddb044
1 changed files with 40 additions and 0 deletions
40
.github/workflows/publish.yml
vendored
Normal file
40
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: publish
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- setup.py
|
||||
- .github/workflows/publish.yml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Publish App to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build, twine
|
||||
pip install --upgrade .
|
||||
|
||||
- name: Build Application
|
||||
run: |
|
||||
rm -rf dist
|
||||
python -m build
|
||||
|
||||
- name: Publish App to Test PyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_KEY }}
|
||||
run: |
|
||||
twine check dist/*
|
||||
twine upload -r testpypi dist/*
|
Loading…
Reference in a new issue