@@ -164,35 +164,40 @@ jobs:
164
164
- name : " Install Rust (uncached)"
165
165
run : rustup update stable
166
166
167
- - name : " Commit raw changes"
168
- run : |
169
- # Backup current repo, so we can checkout.
170
- mkdir -p /tmp/repo
171
- rsync -av --exclude .git --exclude target ./ /tmp/repo/
172
- git fetch origin releases && git switch releases || git switch --orphan releases
173
- find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
174
- # Restore.
175
- rsync -av --ignore-existing /tmp/repo/ .
176
-
177
- # Commit.
178
- git config user.name "Godot-Rust Automation"
179
- git config user.email "[email protected] "
180
- git add .
181
- git commit -m "Repo state for v${{ env.GDEXT_PUBLISHED_VERSION }}"
167
+ - name : " Tag base commit"
168
+ run : git tag "v$GDEXT_PUBLISHED_VERSION"
169
+
170
+ # - name: "Commit raw changes"
171
+ # # Note: first block was for an alternative approach, where a separate `releases` branch tracks deployments.
172
+ # # Such a branch would however be disjoint and require quite a bit of extra space in the repo.
173
+ # run: |
174
+ # # Backup current repo, so we can checkout.
175
+ # mkdir -p /tmp/repo
176
+ # rsync -av --exclude .git --exclude target ./ /tmp/repo/
177
+ # git fetch origin releases && git switch releases || git switch --orphan releases
178
+ # find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
179
+ # # Restore.
180
+ # rsync -av --ignore-existing /tmp/repo/ .
181
+ #
182
+ # git add .
183
+ # git commit -m "Repo state for v${{ env.GDEXT_PUBLISHED_VERSION }}"
182
184
183
185
- name : " Apply #[doc(cfg(...))]"
184
186
# Skip --rustfmt, as it causes weird reformatting of quote! {} statements.
185
187
# #[doc(cfg(...))] on the same line is the lesser evil.
186
188
run : .github/other/apply-doc-cfg.sh --install-sd
187
189
188
- - name : " Commit post-processed changes"
189
- run : git commit -am "Postprocess docs for v${{ env.GDEXT_PUBLISHED_VERSION }}"
190
+ - name : " Commit post-processed docs"
191
+ run : |
192
+ git config user.name "Godot-Rust Automation"
193
+ git config user.email "[email protected] "
194
+ git switch -c tmp
195
+ git commit -am "v${{ env.GDEXT_PUBLISHED_VERSION }} (with doc attributes)"
190
196
191
- - name : " Push changes + tag version "
197
+ - name : " Tag processed commit + push "
192
198
run : |
193
- versionTag="v$GDEXT_PUBLISHED_VERSION"
194
- git tag "$versionTag"
195
- git push origin releases "$versionTag"
199
+ git tag "docs-v$GDEXT_PUBLISHED_VERSION"
200
+ git push origin "v$GDEXT_PUBLISHED_VERSION" "docs-v$GDEXT_PUBLISHED_VERSION"
196
201
197
202
publish :
198
203
runs-on : ubuntu-latest
0 commit comments