Nightly build #256
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: Nightly build | |
on: | |
schedule: | |
- cron: "30 01 * * *" | |
workflow_dispatch: | |
jobs: | |
check_date: | |
runs-on: ubuntu-latest | |
name: Check latest commit | |
outputs: | |
should_run: ${{ steps.should_run.outputs.should_run }} | |
steps: | |
- uses: actions/checkout@v2 | |
- 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: | |
needs: check_date | |
if: ${{ needs.check_date.outputs.should_run != 'false' }} | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 10.0.x | |
include-prerelease: true | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: FinModelUtility | |
- name: Build | |
shell: cmd | |
run: publish_universal_asset_tool.bat /f | |
working-directory: bat | |
- name: Zip files | |
run: Compress-Archive -Path cli/** -Destination fin_model_utility.zip | |
- name: Upload | |
uses: andelf/nightly-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: "Nightly Build ${{ github.sha }}" | |
tag: nightly-${{ github.sha }} | |
files: fin_model_utility.zip | |
prerelease: false |