11name :CD Workflow
22
3- on :
3+ on :
44push :
5- tags :
6- -" services/[a-zA-Z]+/v[0-9]+.[0-9]+.[0-9]+*"
7- -" core/v[0-9]+.[0-9]+.[0-9]+*"
8- workflow_dispatch :
5+ branches :
6+ -main
97
108jobs :
11- main :
12- name : Build & Publish module
13- runs-on : " ubuntu-latest "
14- steps :
15- - name : Checkout
16- uses : actions/checkout@v4
9+ check-version :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
1715 -name :Install Python
1816uses :actions/setup-python@v5
1917with :
20- python-version :" 3.8"
21- -name :Extract updated module path
18+ python-version :" 3.8"
19+ -name :Push tag for each updated package
2220env :
23- TAG :${{ github.event.ref }}
24- run :|
25- # Remove the `refs/tags` prefix of the git tag
26- TAG_NO_PREFIX=$(echo "$TAG" | sed 's/^refs\/tags\///')
27- # Extract the path of the module to publish from the tag
28- PACKAGE_PATH=$(echo "$TAG_NO_PREFIX" | rev | cut -d'/' -f2- | rev)
29- # Save the path to the module for use in the build/publish step to only update the module associated with this tag
30- echo "PACKAGE_PATH=$PACKAGE_PATH" >> $GITHUB_ENV
31- -name :Build & Publish to PyPi
21+ GH_TOKEN :${{ secrets.RENOVATE_TOKEN }}
3222run :|
23+ git config --global user.name "SDK Releaser Bot"
24+ git config --global user.email "noreply@stackit.de"
25+
3326 pip install poetry
34- cd $PACKAGE_PATH
35- poetry publish --build --username="__token__" --no-interaction --password="${{ secrets.PYPI_TOKEN }}"
27+ scripts/cd.sh
28+