Skip to content

Commit

Permalink
Update workflows and remove unneeded patches
Browse files Browse the repository at this point in the history
  • Loading branch information
anxdpanic committed Feb 23, 2023
1 parent b291709 commit fdcc554
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3,042 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/addon-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install git+https://github.com/xbmc/addon-check.git
- name: Kodi Add-on Checker (Isengard)
id: kodi-addon-checker-isengard
- name: Kodi Add-on Checker (Nexus)
id: kodi-addon-checker-nexus
run: |
kodi-addon-checker ${{ github.event.repository.name }} --branch=isengard
- name: Staging for Matrix
run: |
git apply .patches/matrix-kodi-addon-checker.patch
working-directory: ${{ github.event.repository.name }}

- name: Kodi Add-on Checker (Matrix)
id: kodi-addon-checker-matrix
run: |
kodi-addon-checker ${{ github.event.repository.name }} --branch=matrix
kodi-addon-checker ${{ github.event.repository.name }} --branch=nexus
55 changes: 4 additions & 51 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
echo "changes=$changes" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }}

- name: Create Zip (Isengard)
id: zip-isengard
- name: Create Zip (Nexus)
id: zip-nexus
run: |
mv .git ..
rm -rf .??*
Expand All @@ -59,8 +59,8 @@ jobs:
echo "filename=$filename" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }}

- name: Create Zip (Isengard-Unofficial)
id: zip-unofficial-isengard
- name: Create Zip (Nexus-Unofficial)
id: zip-unofficial-nexus
run: |
git reset
git checkout .
Expand All @@ -77,53 +77,6 @@ jobs:
echo "filename=$filename" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }}

- name: Remove Repository
id: remove-repo
run: |
rm -rf ${{ github.event.repository.name }}
- name: Checkout Add-on
uses: actions/checkout@v3
with:
path: ${{ github.event.repository.name }}

- name: Create Zip (Matrix)
id: zip-matrix
run: |
git apply .patches/matrix.patch
mv .git ..
rm -rf .??*
rm *.md
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
filename=${{ github.event.repository.name }}-${version}.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
mv .git ${{ github.event.repository.name }}
echo "filename=$filename" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }}

- name: Create Zip (Matrix-Unofficial)
id: zip-unofficial-matrix
run: |
git reset
git checkout .
git clean -fdx
git apply .patches/matrix-unofficial.patch
mv .git ..
rm -rf .??*
rm *.md
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
filename=${{ github.event.repository.name }}-unofficial-${version}.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
mv .git ${{ github.event.repository.name }}
echo "filename=$filename" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }}

- name: Create Release
id: create-release
uses: actions/create-release@v1
Expand Down
36 changes: 4 additions & 32 deletions .github/workflows/submit-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,41 +48,13 @@ jobs:
mv ../.git .
rm *.md
git add .
git commit -m "Kodi 15 Patch"
git commit -m "Remove Unwanted Files"
working-directory: ${{ github.event.repository.name }}

- name: Submit to Official Repository (Isengard)
id: submit-isengard
- name: Submit to Official Repository (Nexus)
id: submit-nexus
run: |
submit-addon -r repo-plugins -b isengard --pull-request ${{ github.event.repository.name }}
working-directory: ${{ github.event.repository.name }}
env:
GH_USERNAME: anxdpanic
GH_TOKEN: ${{ secrets.ADDON_SUBMISSION_TOKEN }}
EMAIL: [email protected]

- name: Staging for Official Repository (Matrix)
id: stage-matrix
run: |
git reset --hard ${{ github.sha }}
git checkout .
git clean -fdx
git apply .patches/matrix.patch
mv .git ..
rm -rf .??*
mv ../.git .
rm *.md
rm changelog.txt
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
git add .
git commit -m "Kodi 19 Patch"
working-directory: ${{ github.event.repository.name }}

- name: Submit to Official Repository (Matrix)
id: submit-matrix
run: |
submit-addon -r repo-plugins -b matrix --pull-request ${{ github.event.repository.name }}
submit-addon -r repo-plugins -b nexus --pull-request ${{ github.event.repository.name }}
working-directory: ${{ github.event.repository.name }}
env:
GH_USERNAME: anxdpanic
Expand Down
30 changes: 0 additions & 30 deletions .patches/matrix-kodi-addon-checker.patch

This file was deleted.

Loading

0 comments on commit fdcc554

Please sign in to comment.