Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0 # setuptools_scm needs full history and tags to resolve the version
fetch-tags: true

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5

@yo-tak yo-tak Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

別途下記ワーニングが出ていたのでついでに修正(actions/checkoutも同様):

Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v2, actions/setup-python@v2.
For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

with:
python-version: "3.10"

Expand All @@ -32,6 +35,6 @@ jobs:

- name: Publish a Python distribution to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0

@yo-tak yo-tak Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

別途下記ワーニングが出ていたのでついでに修正:

[build-n-publish: # >> PyPA publish to PyPI GHA: UNSUPPORTED GITHUB ACTION VERSION <<#L0](https://github.com/fastlabel/fastlabel-python-sdk/commit/6e97b6cd02efbfce1ae4b9df93fc5b7656a5cbff#annotation_60903713951)
You are using "pypa/gh-action-pypi-publish@master". The "master" branch of this project has been sunset and will not receive any updates, not even security bug fixes.
Please, make sure to use a supported version. If you want to pin to v1 major version, use "pypa/gh-action-pypi-publish@release/v1".
If you feel adventurous, you may opt to use use "pypa/gh-action-pypi-publish@unstable/v1" instead.
A more general recommendation is to pin to exact tags or commit shas.

with:
password: ${{ secrets.PYPI_API_TOKEN }}
14 changes: 14 additions & 0 deletions pypi_update_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ _Creating and deploying a new package version is easy_
- input [version](#version) (ex: `1.12.0`)
- Click `Create new tag: x.x.x`

> **Note:** The tag name becomes the published package version. It is resolved
> automatically from the Git tag by `setuptools_scm` (there is no version string
> to edit in the source), so enter the exact version, matching the existing tag
> format (e.g. `1.12.0`, no `v` prefix). Creating the tag together with the
> release here is fine — the workflow checks out the full history and tags, so
> the version always resolves correctly.

- Target: main

- Release title: `Release x.x.x` (ex: `Release 1.12.0`)
Expand Down Expand Up @@ -69,6 +76,13 @@ If the workflow fails, follow these steps:

### Version

The package version is **derived automatically from the Git tag** by
[`setuptools_scm`](https://github.com/pypa/setuptools-scm) — see `[tool.setuptools_scm]`
and `dynamic = ["version"]` in `pyproject.toml`. There is no version string to edit in
the source; the tag you create in Step 1 is what gets published to PyPI, so it must be a
valid version. (If the tag cannot be resolved, the build falls back to a dev version like
`0.1.dev1+g<sha>`, which PyPI rejects with a `400 Bad Request`.)

We use [semantic versioning](https://packaging.python.org/guides/distributing-packages-using-setuptools/#semantic-versioning-preferred).
If you are adding a meaningful feature, bump the minor version.
If you are fixing a bug, bump the incremental version.
Loading