Skip to content

Commit

Permalink
Merge pull request #93 from fusion-energy/fixing_python_publish_action
Browse files Browse the repository at this point in the history
updated python publish method
  • Loading branch information
shimwell authored Apr 13, 2024
2 parents 9ae279e + f03f694 commit f99fbc1
Showing 1 changed file with 15 additions and 33 deletions.
48 changes: 15 additions & 33 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
Expand All @@ -14,30 +6,20 @@ on:

jobs:
deploy:

runs-on: ubuntu-latest

permissions:
id-token: write
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools build wheel twine
- name: Build package
run: python -m build

- name: Check build
run: twine check dist/*

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
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 a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit f99fbc1

Please sign in to comment.