Skip to content

Commit

Permalink
Update pythonpublish.yml
Browse files Browse the repository at this point in the history
Updated to use pypi Trusted Publisher.
  • Loading branch information
iluvcapra committed Jun 1, 2023
1 parent 51ed92f commit b78ae05
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@ name: Upload Python Package

on:
release:
types: [created]
types: [published]
workflow_dispatch:


permissions:
contents: read
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: release
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
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: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
run: |
python -m build .
twine upload dist/*
pip install build
- name: Build package
run: python -m build
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.8.6
- name: Report to Mastodon
uses: cbrgm/mastodon-github-action@v1.0.1
with:
Expand Down

0 comments on commit b78ae05

Please sign in to comment.