Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiemu committed Oct 9, 2024
1 parent f432645 commit d1a0ff9
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
name: Release to PyPI

on:
workflow_dispatch: # Allows manual triggering of the workflow
workflow_dispatch:

permissions:
contents: read # Allows read access to the repository contents
id-token: write # Required for generating OIDC token for authentication with PyPI
contents: read # Required to read repository contents
id-token: write # Required to generate OIDC token for authentication

jobs:
release:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

# Step 3: Install required dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
# Step 4: Build the package
- name: Build package
run: |
python -m build
# Step 5: Publish to PyPI using OIDC
- name: Publish to PyPI
- name: Publish to PyPI using OIDC
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://upload.pypi.org/legacy/
environment: "Any" # Set this to match your environment name in PyPI's pending publisher
environment: "Any" # Match with the environment specified in PyPI

0 comments on commit d1a0ff9

Please sign in to comment.