Skip to content

Commit

Permalink
Fix deploy script (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 authored Aug 15, 2023
1 parent 2079ffa commit 8531b68
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
name: Upload Python Package
name: deploy

on:
release:
types: [published]
push:

permissions:
contents: read

concurrency:
group: main-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment: PyPi-deploy
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- uses: actions/checkout@v3

- name: Build package
run: python -m build
- uses: actions/setup-python@v3

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Install requirements and build wheel
shell: bash -l {0}
run: |
python -m pip install build twine
python -m build .
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 8531b68

Please sign in to comment.