Skip to content

Commit

Permalink
✏️ Update GitHub actions for main branch only
Browse files Browse the repository at this point in the history
  • Loading branch information
17TheWord committed Jun 26, 2024
1 parent fa2bbb0 commit 880468e
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions .github/workflows/push_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
name: Publish to PyPI

on:
release:
types: [created]
pull_request:
types: [opened, synchronize]
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Install dependencies
run: poetry install --no-root --no-dev

- name: Build
run: poetry build

publish:
if: github.event_name == 'release'
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down

0 comments on commit 880468e

Please sign in to comment.