Merge pull request #3 from Heritage-XioN/add-workflow-action-for-CD-publish-to-pypi
added publish workflow
This commit is contained in:
commit
84f60d66aa
|
|
@ -0,0 +1,38 @@
|
|||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
# The Safety Check
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
- run: uv python install 3.10
|
||||
- run: uv sync --all-extras --dev
|
||||
- run: uv run pytest -x
|
||||
|
||||
# The Publisher
|
||||
# This ONLY runs if 'test' passes successfully.
|
||||
publish:
|
||||
needs: test # <--- The Dependency You Requested
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write # IMPORTANT: Required for Trusted Publishing
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Build package
|
||||
run: uv build
|
||||
|
||||
- name: Publish to PyPI
|
||||
# We use the official PyPA action for OIDC security
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[project]
|
||||
name = "metadata-scrubber-tool"
|
||||
name = "metadata-scrubber"
|
||||
version = "0.1.0"
|
||||
description = "A privacy-focused CLI tool that removes sensitive metadata from image files"
|
||||
readme = "README.md"
|
||||
|
|
|
|||
Loading…
Reference in New Issue