Skip to content

Commit

Permalink
Add workflow for upload to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Strixx76 committed Aug 14, 2024
1 parent 6969a49 commit d0bf376
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Upload Python Package

on: workflow_dispatch

permissions:
contents: read

jobs:
deploy:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pywam
permissions:
id-token: write

steps:
- uses: actions/checkout@v4

- name: Set up Python
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 distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
12 changes: 6 additions & 6 deletions .github/workflows/test-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: Upload Python Test Package

on: workflow_dispatch

Expand All @@ -14,23 +14,23 @@ jobs:
url: https://test.pypi.org/p/pywam
permissions:
id-token: write

steps:
- uses: actions/checkout@v4

- name: Set up Python
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 distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit d0bf376

Please sign in to comment.