Skip to content

Commit

Permalink
Merge pull request #69 from RockefellerArchiveCenter/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
p-galligan authored Nov 27, 2024
2 parents 9fe4512 + e61048d commit 142b9bd
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
# This workflows 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

name: Upload Python Package

on:
release:
types: [created]
workflow_dispatch:

jobs:
deploy:
build:

name: Build distribution
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/asterism

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- 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 setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 142b9bd

Please sign in to comment.