Skip to content

Commit 13f3398

Browse files
committed
Update project URLs in pyproject.toml and enhance GitHub Actions workflow for TestPyPI publishing
- Moved project URLs section in pyproject.toml for better organization. - Added a trigger for TestPyPI publishing on specific tag patterns in the GitHub Actions workflow. - Upgraded actions for artifact upload and download to version 4 for improved functionality.
1 parent 269c2d8 commit 13f3398

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Publish to PyPI
33
on:
44
release:
55
types: [published]
6+
push:
7+
tags:
8+
- 'v*-test' # Trigger TestPyPI on tags like v0.1.0-test
69
workflow_dispatch:
710
inputs:
811
environment:
@@ -40,14 +43,16 @@ jobs:
4043
run: twine check dist/*
4144

4245
- name: Upload artifacts
43-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4447
with:
4548
name: python-package-distributions
4649
path: dist/
4750

4851
publish-to-testpypi:
4952
name: Publish to TestPyPI
50-
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi'
53+
if: |
54+
(github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi') ||
55+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-test'))
5156
needs: [build]
5257
runs-on: ubuntu-latest
5358

@@ -60,7 +65,7 @@ jobs:
6065

6166
steps:
6267
- name: Download artifacts
63-
uses: actions/download-artifact@v3
68+
uses: actions/download-artifact@v4
6469
with:
6570
name: python-package-distributions
6671
path: dist/
@@ -85,7 +90,7 @@ jobs:
8590

8691
steps:
8792
- name: Download artifacts
88-
uses: actions/download-artifact@v3
93+
uses: actions/download-artifact@v4
8994
with:
9095
name: python-package-distributions
9196
path: dist/
@@ -105,7 +110,7 @@ jobs:
105110

106111
steps:
107112
- name: Download artifacts
108-
uses: actions/download-artifact@v3
113+
uses: actions/download-artifact@v4
109114
with:
110115
name: python-package-distributions
111116
path: dist/

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ classifiers = [
3434
"Topic :: Text Processing :: Indexing",
3535
"Operating System :: OS Independent",
3636
]
37-
38-
[project.urls]
39-
Homepage = "https://github.com/starkbaknet/project-vectorizer"
40-
Documentation = "https://github.com/starkbaknet/project-vectorizer#readme"
41-
Repository = "https://github.com/starkbaknet/project-vectorizer"
42-
Issues = "https://github.com/starkbaknet/project-vectorizer/issues"
43-
Changelog = "https://github.com/starkbaknet/project-vectorizer/releases"
4437
dependencies = [
4538
"click>=8.0.0",
4639
"numpy>=1.24.0",
@@ -64,6 +57,13 @@ dependencies = [
6457
"chromadb>=0.4.0"
6558
]
6659

60+
[project.urls]
61+
Homepage = "https://github.com/starkbaknet/project-vectorizer"
62+
Documentation = "https://github.com/starkbaknet/project-vectorizer#readme"
63+
Repository = "https://github.com/starkbaknet/project-vectorizer"
64+
Issues = "https://github.com/starkbaknet/project-vectorizer/issues"
65+
Changelog = "https://github.com/starkbaknet/project-vectorizer/releases"
66+
6767
[project.optional-dependencies]
6868
dev = [
6969
"pytest>=7.0.0",

0 commit comments

Comments
 (0)