-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (59 loc) · 2.44 KB
/
auto-pr.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
52
53
54
55
56
57
58
59
name: Receive New XKCP
on:
repository_dispatch:
types:
- New XKCP Release
jobs:
fetch-new-xkcp-artifacts-and-create-pr:
name: Received New XKCP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Windows Release
uses: dsaltares/fetch-gh-release-asset@v1
with:
repo: "StirlingLabs/XKCP"
version: "tags/${{ github.event.client_payload.tag }}"
file: "XKCP-win.tar.gz"
target: "XKCP-win.tar.gz"
token: ${{ github.token }}
- name: Download OSX Release
uses: dsaltares/fetch-gh-release-asset@v1
with:
repo: "StirlingLabs/XKCP"
version: "tags/${{ github.event.client_payload.tag }}"
file: "XKCP-osx.tar.gz"
target: "XKCP-osx.tar.gz"
token: ${{ github.token }}
- name: Download Linux Release
uses: dsaltares/fetch-gh-release-asset@v1
with:
repo: "StirlingLabs/XKCP"
version: "tags/${{ github.event.client_payload.tag }}"
file: "XKCP-linux.tar.gz"
target: "XKCP-linux.tar.gz"
token: ${{ github.token }}
- name: Extract and commit artifacts
run: |
# Configure Git
git config user.email "[email protected]"
git config user.name "StirlingLabsDaemon"
# Extract Files
tar --wildcards --overwrite -xf XKCP-linux.tar.gz -C XKCP.NET/runtimes/linux-x64/native/ '*.so'
tar --wildcards --overwrite -xf XKCP-osx.tar.gz -C XKCP.NET/runtimes/osx-x64/native/ '*.dylib'
tar --wildcards --overwrite -xf XKCP-win.tar.gz -C XKCP.NET/runtimes/win-x64/native/ '*.dll'
find -type f -path './XKCP.NET/runtimes/**/*' \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' \) -exec chmod -v 755 {} \;
# Commit changes
rm -rf XKCP-*.tar.gz
git commit -am "New version of StirlingLabs/XKCP ${{ github.event.client_payload.tag }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ github.token }}
title: 'New version of StirlingLabs/XKCP ${{ github.event.client_payload.tag }}'
branch: check-xkcp
body: |
[${{ github.event.client_payload.tag }} release of StirlingLabs/XKCP](https://github.com/StirlingLabs/XKCP/releases/tag/${{ github.event.client_payload.tag }})
labels: |
automated-pr
xkcp