-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.84 KB
/
update.yml
File metadata and controls
57 lines (50 loc) · 1.84 KB
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
name: Update Manifest
on:
repository_dispatch:
types: [update-manifest]
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
id: version
run: echo "version=${{ github.event.client_payload.version }}" | sed 's/v//' >> $GITHUB_OUTPUT
- name: Download and hash asset
run: |
VERSION=${{ steps.version.outputs.version }}
curl -sL "https://github.com/outray-tunnel/outray/releases/download/v${VERSION}/outray-win-x64.zip" -o win-x64.zip
echo "SHA_WIN=$(sha256sum win-x64.zip | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Update manifest
run: |
VERSION=${{ steps.version.outputs.version }}
cat > outray.json << EOF
{
"version": "${VERSION}",
"description": "Expose your local server to the internet",
"homepage": "https://github.com/outray-tunnel/outray",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/outray-tunnel/outray/releases/download/v${VERSION}/outray-win-x64.zip",
"hash": "${SHA_WIN}"
}
},
"bin": "outray.exe",
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/outray-tunnel/outray/releases/download/v\$version/outray-win-x64.zip"
}
}
}
}
EOF
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add outray.json
git commit -m "Update outray to ${{ steps.version.outputs.version }}"
git push