Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit eaf869a

Browse files
authored
Merge pull request #142 from supabase-community/j0/add_semver
feat:add semver
2 parents e25c803 + b3abdb7 commit eaf869a

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,36 @@ jobs:
2929

3030
- name: Upload Coverage
3131
uses: codecov/codecov-action@v1
32-
3332
publish:
3433
needs: test
35-
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
34+
if: ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase-community' }}
3635
runs-on: ubuntu-latest
3736
name: "Bump version, create changelog and publish"
37+
environment:
38+
name: pypi
39+
url: https://pypi.org/p/storage3
40+
permissions:
41+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
42+
contents: write # needed for github actions bot to write to repo
3843
steps:
3944
- name: Clone Repository
4045
uses: actions/checkout@v2
4146
with:
4247
ref: ${{ github.ref }}
4348
fetch-depth: 0
49+
- name: Python Semantic Release
50+
id: release
51+
uses: python-semantic-release/[email protected]
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Publish package distributions to PyPI
56+
uses: pypa/gh-action-pypi-publish@release/v1
57+
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
58+
# See https://github.com/actions/runner/issues/1173
59+
if: steps.release.outputs.released == 'true'
4460

4561
- name: Python Semantic Release
46-
uses: relekang/python-semantic-release@master
62+
uses: python-semantic-release/upload-to-gh-release@master
4763
with:
4864
github_token: ${{ secrets.GITHUB_TOKEN }}
49-
repository_username: __token__
50-
repository_password: ${{ secrets.PYPI_TOKEN }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sphinx-toolbox = "^3.4.0"
4444

4545
[tool.semantic_release]
4646
version_variable = "storage3/utils.py:__version__"
47-
version_toml = "pyproject.toml:tool.poetry.version"
47+
version_toml = ["pyproject.toml:tool.poetry.version"]
4848
major_on_zero = false
4949
commit_subject = "chore(release): bump version to v{version}"
5050
build_command = "curl -sSL https://install.python-poetry.org | python - --preview && export PATH=\"/github/home/.local/bin:$PATH\" && poetry install && poetry build"

0 commit comments

Comments
 (0)