Update build system to separate out staging push #99
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: "Export Godot" | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - release | |
| - staging | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} | |
| ITCHIO_USERNAME: ${{ secrets.ITCHIO_USERNAME }} | |
| ITCHIO_GAME: ${{ secrets.ITCHIO_GAME }} | |
| git_branch: ${{ github.ref_name }} | |
| jobs: | |
| export-linux: | |
| name: Linux Export | |
| runs-on: ubuntu-latest | |
| container: registry.gitlab.com/greenfox/godot-build-automation:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| - name: Load .env file | |
| run: cat .env >> "$GITHUB_ENV" | |
| - name: Make run executable | |
| run: chmod +x run | |
| - run: ./run prepare:ci | |
| - run: ./run export:linux | |
| - name: Push to itch.io | |
| if: github.ref_name == 'release' | |
| run: ./run push:linux | |
| - name: Upload Linux Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux | |
| path: build/linux | |
| - name: Releases | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: build/linux/* | |
| tag: linux | |
| file_glob: true | |
| overwrite: true | |
| export-win: | |
| name: Windows Export | |
| runs-on: ubuntu-latest | |
| container: registry.gitlab.com/greenfox/godot-build-automation:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| - name: Load .env file | |
| run: cat .env >> "$GITHUB_ENV" | |
| - name: Make run executable | |
| run: chmod +x run | |
| - run: ./run prepare:ci | |
| - run: ./run export:windows | |
| - name: Push to itch.io | |
| if: github.ref_name == 'release' | |
| run: ./run push:windows | |
| - name: Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows | |
| path: build/windows | |
| - name: Releases | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: build/windows/* | |
| tag: windows | |
| file_glob: true | |
| overwrite: true | |
| export-osx: | |
| name: OSX Export | |
| runs-on: ubuntu-latest | |
| container: registry.gitlab.com/greenfox/godot-build-automation:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| - name: Load .env file | |
| run: cat .env >> "$GITHUB_ENV" | |
| - name: Make run executable | |
| run: chmod +x run | |
| - run: ./run prepare:ci | |
| - run: ./run export:osx | |
| - name: Push to itch.io | |
| if: github.ref_name == 'release' | |
| run: ./run push:osx | |
| - name: Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: build/osx | |
| retention-days: 30 | |
| - name: Upload macOS Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: build/osx/* | |
| tag: osx | |
| file_glob: true | |
| overwrite: true | |
| export-web: | |
| name: Web Export | |
| runs-on: ubuntu-latest | |
| container: registry.gitlab.com/greenfox/godot-build-automation:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| - name: Load .env file | |
| run: cat .env >> "$GITHUB_ENV" | |
| - name: Make run executable | |
| run: chmod +x run | |
| - run: ./run prepare:ci | |
| - run: ./run export:web | |
| - name: Push to itch.io | |
| if: github.ref_name == 'release' | |
| run: ./run push:web | |
| - name: Deploy to GitHub Pages 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| folder: build/web | |
| target-folder: ${{ github.ref_name == 'release' && '' || github.ref_name }} | |
| clean: false |