NightlyBuild #343
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: NightlyBuild | |
| on: | |
| # push: | |
| # branches: | |
| # - "nightly-build-action" | |
| schedule: | |
| - cron: '45 23 * * *' # runs daily at 23:45 | |
| workflow_dispatch: # Allows manual trigger | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| poetry-version: ["latest"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: cm_sim_gamer_kit | |
| fetch-depth: 0 | |
| - name: Fetch develop and rebase CM changes on top | |
| run: | | |
| git config --global user.email "nobody@github.com" | |
| git config --global user.name "Nightly Build" | |
| git fetch origin develop | |
| git rebase origin/develop | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up poetry for dependency management | |
| uses: abatilo/actions-poetry@v2 | |
| with: | |
| poetry-version: ${{ matrix.poetry-version }} | |
| - name: Install the project dependencies with poetry | |
| run: poetry install | |
| - name: Build executable | |
| run: poetry run pyinstaller -y --clean joystick_gremlin.spec | |
| - name: Store current date | |
| run: | | |
| $CURRENT_DATE=& Get-Date -format yyyy_MM_dd | |
| echo "CURRENT_DATE=$CURRENT_DATE" >> $env:GITHUB_ENV | |
| - name: Echo current date | |
| run: | | |
| echo "${{env.CURRENT_DATE}}" | |
| - name: Compress the build | |
| run: | | |
| Compress-Archive -Path dist/* -DestinationPath dist/joystick_gremlin_nightly_${{env.CURRENT_DATE}}.zip | |
| shell: pwsh | |
| - name: Upload build to Nightly release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: Nightly | |
| files: dist/joystick_gremlin_nightly_${{env.CURRENT_DATE}}.zip | |
| token: ${{ secrets.GITHUB_TOKEN }} |