Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

chore: change alpha release workflow

jinzhenj337115ab9b8c
diff --git a/.github/workflows/alpha-release.yml b/.github/workflows/alpha-release.yml
index 988c2a51..96f2cbc7 100644
--- a/.github/workflows/alpha-release.yml
+++ b/.github/workflows/alpha-release.yml
@@ -101,8 +101,6 @@ jobs:
environment:
name: pypi
url: https://pypi.org/project/mineru/${{ needs.build.outputs.version }}/
- permissions:
- id-token: write
steps:
- name: Download validated wheel
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
@@ -110,8 +108,13 @@ jobs:
name: mineru-${{ needs.build.outputs.version }}
path: dist
- - name: Publish wheel through PyPI Trusted Publishing
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
+ - name: Publish wheel to PyPI
+ env:
+ TWINE_USERNAME: __token__
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+ run: |
+ python -m pip install --upgrade twine
+ python -m twine upload dist/*
github-release:
name: Create GitHub pre-release
diff --git a/docs/plans/2026-07-10-mineru-alpha-release-design.md b/docs/plans/2026-07-10-mineru-alpha-release-design.md
index e9df7aad..194a2f3c 100644
--- a/docs/plans/2026-07-10-mineru-alpha-release-design.md
+++ b/docs/plans/2026-07-10-mineru-alpha-release-design.md
@@ -26,7 +26,7 @@ The build job:
5. installs the wheel without dependencies in a clean virtual environment and verifies its installed distribution version;
6. uploads the validated wheel as a workflow artifact.
-The publishing job downloads exactly that artifact and publishes it through PyPI Trusted Publishing. It uses the protected `pypi` GitHub environment and grants `id-token: write` only to this job.
+The publishing job downloads exactly that artifact and publishes it with Twine, using the same PyPI API token authentication as the stable release workflow. The token is read from the `PYPI_TOKEN` GitHub secret through Twine's `TWINE_PASSWORD` environment variable. The job remains associated with the protected `pypi` GitHub environment.
The final job creates a GitHub pre-release and attaches the same wheel. It runs only after the PyPI publishing job succeeds.
@@ -34,7 +34,7 @@ The final job creates a GitHub pre-release and attaches the same wheel. It runs
- Third-party actions are pinned to immutable commit SHAs where practical.
- Default workflow permissions are read-only; write permissions are scoped to the jobs that need them.
-- No long-lived PyPI API token is used.
+- PyPI authentication uses the existing `PYPI_TOKEN` GitHub secret. The token should be project-scoped to `mineru` and rotated according to the release credential policy.
- Concurrency is scoped to the tag so duplicate runs for one tag cannot publish concurrently.
- Existing PyPI versions are not silently skipped. A duplicate upload fails visibly because published files are immutable.
- A validation, build, or smoke-test failure stops before the publishing job.
@@ -44,6 +44,7 @@ The final job creates a GitHub pre-release and attaches the same wheel. It runs
1. Update `mineru/version.py` on `next`, for example to `4.0.0a1`.
2. Commit the version change and let normal CI pass.
3. Create and push the annotated tag `v4.0.0a1`.
-4. Approve the protected `pypi` environment deployment if required.
+4. Ensure the repository or `pypi` environment provides the `PYPI_TOKEN` secret.
+5. Approve the protected `pypi` environment deployment if required.
The workflow implementation can be tested locally without creating or pushing a tag. Merely adding the workflow does not publish anything.