Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/publish-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Publish on PyPI"

# This workflow is triggered when a new release is published on GitHub. It
# builds the package and uploads it to PyPI.

on:
release:
types: [published]

jobs:
deploy_pypi:
if: ${{ github.repository == 'omsf/spec0' }}
runs-on: ubuntu-latest
name: "Publish on PyPI"
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: "Install release tools"
run: |
python -m pip install twine build
- name: "Build and check package"
run: |
python -m build --sdist --wheel
twine check dist/*
- name: "Publish on pypi"
uses: pypa/gh-action-pypi-publish@release/v1
Copy link

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin the action to a specific commit hash instead of using the mutable 'release/v1' tag to prevent supply chain attacks. For example, use a format like 'pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450'.

Suggested change
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the recommendation, but since I'm going to do a video on this, I'm going to keep it clear (and recommend that viewers check whatever the most recent hash is).

Loading