-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52cd4bf
commit a9bf1a5
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deploy Nightly | ||
on: | ||
schedule: | ||
- cron: '0 20 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-commits: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Nim | ||
- uses: iffy/install-nim@v5 | ||
with: | ||
version: binary:2.0.2 | ||
|
||
- name: Set up PowerShell | ||
shell: pwsh | ||
|
||
- name: Check for commits today | ||
id: check_commits | ||
run: | | ||
# Get the current date in YYYY-MM-DD format | ||
$today = (Get-Date).ToString("yyyy-MM-dd") | ||
# Get the list of commits for today | ||
$commits = git log --since="$today 00:00:00" --until="$today 23:59:59" --pretty=format:"%H" | ||
# If there are no commits, set the output to 'false' | ||
if (-not $commits) { | ||
echo "::set-output name=commits_present::false" | ||
} else { | ||
echo "::set-output name=commits_present::true" | ||
} | ||
- name: Run Build if Commits Present | ||
if: steps.check_commits.outputs.commits_present == 'true' | ||
run: | | ||
echo "Commits were found for today. Running build script..." | ||
./build.ps1 | ||
- name: Upload Build Artifact | ||
if: steps.check_commits.outputs.commits_present == 'true' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: lychee-build-windows | ||
path: lychee-build-win.zip |
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
Binary file not shown.