-
-
Notifications
You must be signed in to change notification settings - Fork 11
98 lines (84 loc) · 3.13 KB
/
Copy pathBuild_package_DSM74.yml
File metadata and controls
98 lines (84 loc) · 3.13 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: DSM 7.4 Build n Release Transcode for x25 Package
on:
workflow_dispatch:
workflow_call:
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build-spk:
name: Build Package DSM 7.4
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get release tag
id: get_latest_tag
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "new_tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
latest_tag=$(gh release list --limit 1 --json tagName --jq '.[0].tagName')
if [ -z "$latest_tag" ]; then
echo "ERROR: Could not determine release tag" >&2
exit 1
fi
echo "new_tag=$latest_tag" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check if SPKs already exist in release
id: check_assets
run: |
existing=$(curl -s "https://api.github.com/repos/007revad/Transcode_for_x25/releases/tags/${{ steps.get_latest_tag.outputs.new_tag }}" \
| jq -r '.assets[].name' | grep -c 'DSM-7.4' || true)
echo "spk_count=$existing" >> $GITHUB_OUTPUT
- name: Stage DSM-version modules
if: steps.check_assets.outputs.spk_count == '0'
run: |
cp package/7.4/*.ko src/lib/modules/
ls -la src/lib/modules/
- name: Set os_min_ver for DSM 7.4
if: steps.check_assets.outputs.spk_count == '0'
run: |
sed -i 's/"os_min_ver": "7.2-72806"/"os_min_ver": "7.4-90075"/' package.json
sed -i 's/"os_max_ver": "9.9-99999"/"os_max_ver": "7.4-99999"/' package.json
- name: Show toolkit source tree
if: steps.check_assets.outputs.spk_count == '0'
run: |
find /toolkit/source -type f 2>/dev/null || echo "Toolkit source not populated yet"
- name: Synology Package Builder Github Action
if: steps.check_assets.outputs.spk_count == '0'
#uses: tomgrv/synology-package-builder@v1.3.0
uses: 007revad/synology-package-builder@main
with:
dsm: '7.4'
arch: 'kvmx64'
output: ./dist
- name: Remove debug spk and rename package
if: steps.check_assets.outputs.spk_count == '0'
run: |
ls -l ./dist
rm ./dist/*_debug.spk
for f in ./dist/*.spk; do
mv "$f" "./dist/Transcode_${{ steps.get_latest_tag.outputs.new_tag }}-DSM-7.4-geminilakenk.spk"
done
ls -l ./dist
- name: Upload Package
if: steps.check_assets.outputs.spk_count == '0'
uses: actions/upload-artifact@v4
with:
name: Transcode_DSM-7.4-geminilakenk
path: ./dist/*.spk
- name: Release
if: steps.check_assets.outputs.spk_count == '0'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_latest_tag.outputs.new_tag }}
make_latest: false
fail_on_unmatched_files: false
files: |
./dist/*.spk