Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jurihock committed Mar 23, 2024
1 parent e596ad8 commit c310a94
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: publish.yml

on: [push]

jobs:

publish:

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@master

- name: Python 3.11
uses: actions/setup-python@master
with:
python-version: '3.11'

- name: Install
run: |
pip install build
- name: Build
run: |
python -m build
- name: Publish (pypi.org)
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish (test.pypi.org)
if: ${{ false }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy

0 comments on commit c310a94

Please sign in to comment.