File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish to PyPI on new release
22
33on :
4- workflow_dispatch :
4+ release :
5+ types : [published, edited]
56
67jobs :
78 publish :
8- if : ${{ startsWith(github.ref , 'refs/tags/ ai-personas') == false }}
9+ if : ${{ startsWith(github.event.release.tag_name , 'ai-personas') == false }}
910 runs-on : ubuntu-24.04
1011 permissions :
1112 id-token : write
@@ -15,22 +16,15 @@ jobs:
1516 - uses : actions/setup-python@v6.2.0
1617 with :
1718 python-version : 3.x
18- - id : project
19- run : |
20- git fetch --tags
21- TAG=$(git describe --tags --abbrev=0)
22- echo "The tag is: $TAG"
23- PROJECT=$(echo "$TAG" | sed -E 's/-[0-9]+(\.[0-9]+)+$//')
19+ - run : |
20+ TAG="${{ github.event.release.tag_name }}"
21+ PROJECT="${TAG%-*}"
2422 echo "PROJECT=$PROJECT" >> $GITHUB_ENV
25- echo "Project directory is: $PROJECT"
2623 - run : pip install build
2724 - run : |
28- echo "Current directory:"
2925 pwd
30- echo "Listing contents of the directory"
3126 ls -la
3227 cd ${{ env.PROJECT }} && python -m build
33- - name : Publish to PyPI
34- uses : pypa/gh-action-pypi-publish@release/v1.14
28+ - uses : pypa/gh-action-pypi-publish@release/v1.14
3529 with :
3630 packages-dir : ${{ env.PROJECT }}/dist
You can’t perform that action at this time.
0 commit comments