Release addon #14
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 addon | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: "main" | |
| - name: Fetch addon sources | |
| run: | | |
| git fetch --all | |
| git rev-parse --short HEAD > $RUNNER_TEMP/main_head_commit_hash.txt | |
| mv ./addons $RUNNER_TEMP | |
| - name: Prepare release branch | |
| run: | | |
| git switch release | |
| mv .git $RUNNER_TEMP | |
| find . -name . -o -prune -exec rm -rf -- {} + | |
| mv $RUNNER_TEMP/.git . | |
| cp -a $RUNNER_TEMP/addons/kodot/. ./ | |
| - name: Push | |
| run: | | |
| SHA=$(cat $RUNNER_TEMP/main_head_commit_hash.txt) | |
| git config user.name "Release Script" | |
| git config user.email "<>" | |
| git commit -am "Release Godot addon sources for commit $SHA" | |
| git push origin release |