Release Branch #224
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Branch | |
| on: | |
| workflow_run: | |
| workflows: ["Tests"] | |
| types: | |
| - completed | |
| jobs: | |
| release: | |
| if: ${{ github.repository_owner == 'WaspScripts' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name "Wasp Bot" | |
| git config --global user.email "[email protected]" | |
| - name: Recreate release branch | |
| run: | | |
| git fetch --all | |
| git branch -D release || true | |
| git checkout -b release origin/main | |
| - name: Remove unwanted files | |
| run: rm -rf tests | |
| - name: Strip multi-line comments | |
| run: find . -name "*.simba" -type f -exec perl -0777 -i -pe 's/\(\*.*?\*\)//gs' {} + | |
| - name: Commit and push to release | |
| run: | | |
| git add . | |
| git commit -m "Sync release with main and strip comments" || echo "No changes to commit" | |
| git push origin release --force | |
| - name: Check release branch size | |
| run: | | |
| echo "Release branch size:" | |
| du -sh . | |
| - name: Check main branch size | |
| run: | | |
| git fetch origin main | |
| git checkout -b temp-main origin/main | |
| echo "Main branch size:" | |
| du -sh . |