Skip to content

Commit 8c2eaaf

Browse files
Reset release build to clear out old contents (#1767)
* Reset release build to clear out old contents * Retain git history, just clear out files * lint fix
1 parent e0566e7 commit 8c2eaaf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ jobs:
4949
cat ${{ github.workspace }}/CHANGELOG.txt
5050
echo "Current tag is: $(git rev-list --tags --max-count=1)"
5151
52-
- name: Checkout code from main into release branch
52+
- name: Ensure clean release branch from main
5353
run: |
54-
# Checkout the code of main onto releases
54+
# Remove all tracked and untracked files except .git and .github
55+
find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name '.github' -exec rm -rf {} +
56+
57+
# Copy files from main branch
5558
git checkout main -- .
5659
5760
- name: Build release

0 commit comments

Comments
 (0)