-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 2.02 KB
/
Copy pathsubmit.yml
File metadata and controls
52 lines (46 loc) · 2.02 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
name: Submit to Kodi repo-scripts
# Triggers ONLY when you publish a *stable* GitHub Release.
# - Beta: create the Release and tick "Set as a pre-release". That fires
# the `prereleased`/`published` events, NOT `released`, so nothing
# is submitted to Kodi — your betas stay as pre-release tags only.
# - Stable: publish a normal (non-prerelease) Release. `released` fires and
# the addon is submitted.
# The package version comes from addon.xml, not the release/tag name.
on:
release:
types: [released]
jobs:
submit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Hard backstop: never submit a pre-release version, even if a Release
# is accidentally published as (or promoted to) a full release. Kodi
# pre-release versions carry '~' (e.g. 2.0.0~beta1); stable versions
# never do. Bumping addon.xml to a final version is thus a deliberate
# prerequisite of any submission.
- name: Abort if addon.xml version is a pre-release
run: |
version=$(sed -n 's/.*<addon [^>]*version="\([^"]*\)".*/\1/p' addon.xml | head -n1)
if [ -z "$version" ]; then
echo "::error::Could not parse version from addon.xml; refusing to submit."
exit 1
fi
echo "addon.xml version: $version"
case "$version" in
*~*)
echo "::error::Version '$version' is a pre-release (contains '~'); refusing to submit to repo-scripts."
exit 1
;;
esac
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install addon submitter
run: pip install git+https://github.com/xbmc/kodi-addon-submitter.git
- name: Submit to repo-scripts (nexus)
env:
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
EMAIL: ${{ secrets.EMAIL }}
run: submit-addon -r repo-scripts -b nexus --pull-request script.audiooffsetmanager.evolved