Nightly Release #301
This file contains 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: Nightly Release | |
on: | |
# This can be used to automatically publish nightlies at UTC nighttime | |
schedule: | |
- cron: '0 3 * * *' # run at 3 AM UTC | |
# This can be used to allow manually triggering nightlies from the web interface | |
workflow_dispatch: | |
jobs: | |
date-check: | |
runs-on: ubuntu-latest | |
name: Check latest commit | |
outputs: | |
should_run: ${{ steps.should_run.outputs.should_run }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: print latest_commit | |
run: echo ${{ github.sha }} | |
- id: should_run | |
continue-on-error: true | |
name: check latest commit is less than a day | |
if: ${{ github.event_name == 'schedule' }} | |
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" | |
build-msvc: | |
needs: date-check | |
if: ${{ needs.date-check.outputs.should_run != 'false' }} | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: "Build ChaosMod" | |
id: "build" | |
uses: "./.github/actions/build" | |
with: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: "Release ChaosMod" | |
if: steps.build.outcome == 'success' | |
uses: "./.github/actions/release" |