diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index 8d99dc4..75cdf25 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -34,6 +34,31 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Git + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + - name: Create or switch to release branch + run: | + git checkout -B release + + - name: Copy files from tag + run: | + TAG_NAME=$(git describe --tags --abbrev=0) + git checkout $TAG_NAME -- . + + - name: Commit changes + run: | + git add -A + git commit -m "Update release branch to $TAG_NAME" + + - name: Push to release branch + run: | + git push origin release --force + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Python uses: actions/setup-python@v5 with: