Skip to content

Commit 0cb4a3a

Browse files
committed
update workflows to nexus
1 parent c6baff9 commit 0cb4a3a

File tree

3 files changed

+20
-91
lines changed

3 files changed

+20
-91
lines changed

.github/workflows/addon-validations.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- name: Set up Python v3.6
20-
uses: actions/setup-python@v2
19+
- name: Set up Python v3.9
20+
uses: actions/setup-python@v3
2121
with:
22-
python-version: '3.6'
22+
python-version: '3.9'
2323

2424
- name: Checkout Add-on
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
2626
with:
2727
path: ${{ github.event.repository.name }}
2828

@@ -31,20 +31,7 @@ jobs:
3131
python -m pip install --upgrade pip
3232
python -m pip install git+https://github.com/xbmc/addon-check.git
3333
34-
- name: Kodi Add-on Checker (Jarvis)
35-
id: kodi-addon-checker-jarvis
34+
- name: Kodi Add-on Checker (Nexus)
35+
id: kodi-addon-checker-nexus
3636
run: |
37-
kodi-addon-checker ${{ github.event.repository.name }} --branch=jarvis
38-
39-
- name: Staging for Matrix
40-
run: |
41-
git reset
42-
git checkout .
43-
git clean -fdx
44-
git apply .patches/matrix.patch
45-
working-directory: ${{ github.event.repository.name }}
46-
47-
- name: Kodi Add-on Checker (Matrix)
48-
id: kodi-addon-checker-matrix
49-
run: |
50-
kodi-addon-checker ${{ github.event.repository.name }} --branch=matrix
37+
kodi-addon-checker ${{ github.event.repository.name }} --branch=nexus

.github/workflows/make-release.yml

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ jobs:
2626
fi
2727
2828
- name: Checkout Add-on
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030
with:
3131
path: ${{ github.event.repository.name }}
3232

3333
- name: Install dependencies
3434
run: |
35+
sudo apt-get update
3536
sudo apt-get install libxml2-utils xmlstarlet zip
3637
3738
- name: Get Variables
@@ -46,8 +47,8 @@ jobs:
4647
echo ::set-output name=version::$version
4748
working-directory: ${{ github.event.repository.name }}
4849

49-
- name: Create Zip (Jarvis)
50-
id: zip-jarvis
50+
- name: Create Zip (Nexus)
51+
id: zip-nexus
5152
run: |
5253
git reset
5354
git checkout .
@@ -62,25 +63,6 @@ jobs:
6263
echo ::set-output name=filename::$filename
6364
working-directory: ${{ github.event.repository.name }}
6465

65-
- name: Create Zip (Matrix)
66-
id: zip-matrix
67-
run: |
68-
git reset
69-
git checkout .
70-
git clean -fdx
71-
git apply .patches/matrix.patch
72-
mv .git ..
73-
rm -rf .??*
74-
rm *.md
75-
xmlstarlet ed -L -u '/addon/@version' -v "${{ steps.variables.outputs.version }}+matrix.1" addon.xml
76-
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
77-
filename=${{ github.event.repository.name }}-${version}.zip
78-
cd ..
79-
zip -r $filename ${{ github.event.repository.name }}
80-
mv .git ${{ github.event.repository.name }}
81-
echo ::set-output name=filename::$filename
82-
working-directory: ${{ github.event.repository.name }}
83-
8466
- name: Create Release
8567
id: create-release
8668
uses: actions/create-release@v1
@@ -93,24 +75,13 @@ jobs:
9375
draft: false
9476
prerelease: ${{ steps.release.outputs.pre-release }}
9577

96-
- name: Upload Zip (Jarvis)
97-
id: upload-jarvis
98-
uses: actions/upload-release-asset@v1
99-
env:
100-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
with:
102-
upload_url: ${{ steps.create-release.outputs.upload_url }}
103-
asset_name: ${{ steps.zip-jarvis.outputs.filename }}
104-
asset_path: ${{ steps.zip-jarvis.outputs.filename }}
105-
asset_content_type: application/zip
106-
107-
- name: Upload Zip (Matrix)
108-
id: upload-matrix
78+
- name: Upload Zip (Nexus)
79+
id: upload-nexus
10980
uses: actions/upload-release-asset@v1
11081
env:
11182
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11283
with:
11384
upload_url: ${{ steps.create-release.outputs.upload_url }}
114-
asset_name: ${{ steps.zip-matrix.outputs.filename }}
115-
asset_path: ${{ steps.zip-matrix.outputs.filename }}
85+
asset_name: ${{ steps.zip-nexus.outputs.filename }}
86+
asset_path: ${{ steps.zip-nexus.outputs.filename }}
11687
asset_content_type: application/zip

.github/workflows/submit-release.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@ jobs:
1919

2020
steps:
2121
- name: Checkout Add-on
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323
with:
2424
path: ${{ github.event.repository.name }}
2525

2626
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v2
27+
uses: actions/setup-python@v3
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030

3131
- name: Install dependencies
3232
run: |
33-
sudo apt-get install libxml2-utils xmlstarlet
3433
python -m pip install --upgrade pip
3534
python -m pip install git+https://github.com/romanvm/kodi-addon-submitter.git
3635
@@ -49,38 +48,10 @@ jobs:
4948
git commit -m "Remove unwanted files"
5049
working-directory: ${{ github.event.repository.name }}
5150

52-
- name: Submit to Official Repository (Jarvis)
53-
id: submit-jarvis
51+
- name: Submit to Official Repository (Nexus)
52+
id: submit-nexus
5453
run: |
55-
submit-addon -r repo-scripts -b jarvis --pull-request ${{ github.event.repository.name }}
56-
working-directory: ${{ github.event.repository.name }}
57-
env:
58-
GH_USERNAME: anxdpanic
59-
GH_TOKEN: ${{ secrets.ADDON_SUBMISSION_TOKEN }}
60-
61-
62-
- name: Staging for Official Repository (Matrix)
63-
id: stage-matrix
64-
run: |
65-
git reset --hard ${{ github.sha }}
66-
git checkout .
67-
git clean -fdx
68-
git apply .patches/matrix.patch
69-
mv .git ..
70-
rm -rf .??*
71-
mv ../.git .
72-
rm *.md
73-
rm changelog.txt
74-
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
75-
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
76-
git add .
77-
git commit -m "Kodi 19 Patch"
78-
working-directory: ${{ github.event.repository.name }}
79-
80-
- name: Submit to Official Repository (Matrix)
81-
id: submit-matrix
82-
run: |
83-
submit-addon -r repo-scripts -b matrix --pull-request ${{ github.event.repository.name }}
54+
submit-addon -r repo-scripts -b nexus --pull-request ${{ github.event.repository.name }}
8455
working-directory: ${{ github.event.repository.name }}
8556
env:
8657
GH_USERNAME: anxdpanic

0 commit comments

Comments
 (0)