@@ -76,13 +76,6 @@ outputs:
7676runs :
7777 using : ' composite'
7878 steps :
79- - name : Symlink current action repo
80- env :
81- action_path : ${{ github.action_path }}
82- shell : bash
83- run : |
84- ln -fs ${{ env.action_path }} .github/actions
85-
8679 - name : Set up environment
8780 id : set-env
8881 shell : bash
@@ -96,10 +89,18 @@ runs:
9689 echo "Error: Invalid version"
9790 exit 1
9891 fi
92+
9993 - name : Update version in setup.py
10094 shell : bash
10195 run : sed -i "s/version='.*',/version='$VERSION',/" setup.py
10296
97+ - name : Commit changes
98+ shell : bash
99+ run : |
100+ git config --local user.email "action@github.com"
101+ git config --local user.name "GitHub Action"
102+ git diff --exit-code || git commit -am "Update version to $VERSION"
103+
103104 - if : ${{ inputs.pre-build-command }}
104105 name : Run pre-build command
105106 shell : bash
@@ -110,6 +111,13 @@ runs:
110111 shell : bash
111112 run : python setup.py sdist
112113
114+ - name : Symlink current action repo
115+ env :
116+ action_path : ${{ github.action_path }}
117+ shell : bash
118+ run : |
119+ ln -fs ${{ env.action_path }} .github/actions
120+
113121 - if : ${{ inputs.use-devcontainer != 'true' }}
114122 name : Build native packages
115123 uses : ./.github/actions/native
@@ -144,17 +152,12 @@ runs:
144152 shell : bash
145153 run : ${{ inputs.post-build-command }}
146154
147- - name : Commit changes
148- shell : bash
149- run : |
150- git config --local user.email "action@github.com"
151- git config --local user.name "GitHub Action"
152- git diff --exit-code || git commit -am "Update version to $VERSION"
153155 - name : Push changes
154156 uses : ad-m/github-push-action@master
155157 if : ${{ !startsWith(github.ref, 'refs/pull/') && success() }}
156158 with :
157159 github_token : ${{ github.token }}
160+
158161 - name : Publish distributions
159162 uses : actions/upload-artifact@v4
160163 if : ${{ !startsWith(github.ref, 'refs/pull/') }}
0 commit comments