-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.67 KB
/
publish-release-to-otd.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
49
50
51
name: Publish Release to OTD Plugin-Repository
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish-to-otd:
name: Publish to OTD Plugin-Repository
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
name: Checkout ${{github.repository}}
with:
path: source
fetch-depth: 0
ref: master
- uses: actions/checkout@v4
name: Checkout OpenTabletDriver/Plugin-Repository
with:
repository: OpenTabletDriver/Plugin-Repository
path: plugins
fetch-depth: 0
ref: master
- name: Run update script
id: UpdateScript
shell: pwsh
run: |
.\source\update-release-metadata.ps1 `
-GitHubToken ${{github.token}} `
-PluginRepositoryPath (Get-Item plugins).FullName
cd plugins
git diff --exit-code | Out-Null
if ($LastExitCode -eq 0) {
$HaveChanges="false"
} else {
$HaveChanges="true"
}
Add-Content $Env:GITHUB_OUTPUT "HAVE_CHANGES=${HaveChanges}"
Exit 0
- name: Create pull request
if: ${{ steps.UpdateScript.outputs.HAVE_CHANGES }}
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
path: plugins
author: "OpenKneeboard Bot <[email protected]>"
branch: "update-OTDIPC"
delete-branch: true
push-to-fork: openkneeboard-bot/OTD-Plugin-Repository
token: ${{ secrets.OPENKNEEBOARD_BOT_PAT }}
title: "Update OTD-IPC plugin"
commit-message: "Update OTD-IPC plugin"