@@ -2,7 +2,8 @@ name: ci/cd
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [ '**' ]
6+ tags-ignore : [ '**' ]
67
78jobs :
89
@@ -118,10 +119,10 @@ jobs:
118119
119120
120121 # ###########################################################################
121- # RELEASE
122+ # TAG NEW VERSION
122123 # ###########################################################################
123124
124- release :
125+ tag-new-version :
125126 # only run on main/master/default
126127 if : format('refs/heads/{0}', github.event.repository.default_branch) == github.ref
127128 needs : [
@@ -132,11 +133,12 @@ jobs:
132133 py-dependencies
133134 ]
134135 runs-on : ubuntu-latest
135- concurrency : release # prevent any possible race conditions
136+ concurrency : tag-new-version # prevent any possible race conditions
136137 steps :
137138 - uses : actions/checkout@v4
138139 with :
139140 fetch-depth : 0 # required to see tags and commits
141+ ref : ${{ github.sha }} # in case 'ref' (arg default) has been updated since start
140142 - uses : actions/setup-python@v5
141143 with :
142144 python-version : " ${{ fromJSON(needs.py-versions.outputs.matrix)[0] }}"
@@ -146,28 +148,15 @@ jobs:
146148 with :
147149 force-patch-if-no-commit-token : true
148150 ignore-paths : |
149- .github/**
150151 .gitignore
151152 assets/**
152153 dependencies-logs/**
153154 resources/foo/**
154155
155- - uses : WIPACrepo/wipac-dev-py-build-action@main
156+ - name : Tag New Version
156157 if : steps.next-version.outputs.version != ''
157- with :
158- version : ${{ steps.next-version.outputs.version }}
159-
160- - uses : softprops/action-gh-release@v2
161- if : steps.next-version.outputs.version != ''
162- with :
163- files : dist/*
164- tag_name : v${{ steps.next-version.outputs.version }}
165- generate_release_notes : true
166- env :
167- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
168-
169- - uses : pypa/gh-action-pypi-publish@release/v1
170- if : steps.next-version.outputs.version != ''
171- with :
172- user : __token__
173- password : ${{ secrets.PYPI_TOKEN }}
158+ run : |
159+ set -euo pipefail
160+ echo "now: $(date -u +"%Y-%m-%dT%H:%M:%S.%3N")"
161+ git tag ${{ steps.next-version.outputs.version }}
162+ git push origin ${{ steps.next-version.outputs.version }}
0 commit comments