-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (42 loc) · 1.4 KB
/
check-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Check if newer version is available
on:
push:
branches: [ master ]
paths:
- '.github/workflows/check-version.yml'
schedule:
- cron: "0 */1 * * *"
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
check-for-newer-version:
name: Check for newer version
runs-on: ubuntu-latest
steps:
- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
- name: Run VersionChecker
id: status
run: >-
dotnet tool install -g dotnet-script;
$status = dotnet script -v e ./build/VersionChecker.csx;
echo "::set-env name=newer_version_status::$status";
shell: pwsh
- name: Log has_newer_version
run: echo "::warning ::newer_version_status=${{steps.status.outputs.newer_version_status}}"
shell: pwsh
- name: Trigger publish
if: steps.status.outputs.newer_version_status == '0'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{secrets.REPO_ACCESS_TOKEN}}
repository: BUTR/Bannerlord.Harmony
event-type: publish
client-payload: '{"github": ${{ toJson(github) }}}'