Skip to content

Commit

Permalink
Added PyPI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jithu7432 committed Jun 30, 2024
1 parent 637554a commit fa3e883
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on:
push:
branches: ["master"]
branches: ["!master"]
pull_request:

workflow_dispatch:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to PyPI

on:
push:
branches: ["master"]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Python3
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build Package
run: |
python -m build
- name: Publish Package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit fa3e883

Please # to comment.