Skip to content

Commit 6037880

Browse files
committed
script.skinshortcuts-3.0.0~beta1
0 parents  commit 6037880

File tree

182 files changed

+63370
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+63370
-0
lines changed

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Add-on Validations
2+
3+
on:
4+
push:
5+
branches: [ master, main, dev ]
6+
7+
pull_request:
8+
branches: [ master, main, dev ]
9+
10+
jobs:
11+
12+
addon-validations:
13+
14+
name: Add-on Validations
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Set up Python v3.9
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.9'
22+
23+
- name: Checkout Add-on
24+
uses: actions/checkout@v3
25+
with:
26+
path: ${{ github.event.repository.name }}
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install isort
32+
python -m pip install pylint
33+
python -m pip install simpleeval
34+
python -m pip install unidecode
35+
python -m pip install git+https://github.com/xbmc/addon-check.git
36+
37+
- name: Kodi Add-on Checker
38+
id: kodi-addon-checker-matrix
39+
run: |
40+
kodi-addon-checker ${{ github.event.repository.name }} --branch=matrix
41+
42+
- name: Pylint
43+
id: pylint
44+
run: |
45+
cp -t ${HOME} .pylintrc
46+
pylint resources/lib/
47+
working-directory: ${{ github.event.repository.name }}
48+
49+
- name: isort
50+
id: isort
51+
run: |
52+
isort --force-single-line-imports . --diff
53+
working-directory: ${{ github.event.repository.name }}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Close Translation Pull Requests
2+
3+
on:
4+
pull_request:
5+
branches: [ master, main, dev ]
6+
7+
jobs:
8+
9+
close-translation-prs:
10+
if: github.actor != 'weblate' && github.actor != 'anxdpanic' && github.repository == 'mikesilvo164/script.skinshortcuts'
11+
12+
name: Close Translation Pull Requests
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Get changed files
17+
id: modified_files
18+
uses: trilom/file-changes-action@v1.2.4
19+
with:
20+
output: ","
21+
22+
- name: Check the PR for translations
23+
id: check
24+
run: |
25+
shopt -s nocasematch
26+
if [[ "${{ steps.modified_files.outputs.files_modified }}" == *"en_gb/strings.po"* ]]; then
27+
echo "Found modified en_gb, likely a valid PR"
28+
unset CLOSE
29+
elif [[ "${{ steps.modified_files.outputs.files_modified }}" == *"strings.po"* ]]; then
30+
echo "Found modified strings.po, unwanted."
31+
CLOSE="true"
32+
elif [[ "${{ steps.modified_files.outputs.files_added }}" == *"strings.po"* ]]; then
33+
echo "Found added strings.po, unwanted."
34+
CLOSE="true"
35+
elif [[ "${{ steps.modified_files.outputs.files_removed }}" == *"strings.po"* ]]; then
36+
echo "Found removed strings.po, unwanted."
37+
CLOSE="true"
38+
else
39+
echo "No strings.po were modified or added, not a translation."
40+
unset CLOSE
41+
fi
42+
echo ::set-output name=close::${CLOSE}
43+
44+
- name: Comment on the PR
45+
uses: mshick/add-pr-comment@v1
46+
if: ${{ steps.check.outputs.close }}
47+
with:
48+
repo-token: ${{ secrets.GITHUB_TOKEN }}
49+
repo-token-user-login: 'github-actions[bot]'
50+
allow-repeats: true
51+
message: |
52+
A modified strings.po file was detected.
53+
54+
Translations are not accepted through PRs, please use Weblate if you'd like to contribute to the translations.
55+
For more information see Issue #58.
56+
57+
If you feel this PR was closed in error, please reply below.
58+
Thank you for your interest in improving this add-on.
59+
60+
- name: Close the PR
61+
uses: peter-evans/close-pull@v1
62+
if: ${{ steps.check.outputs.close }}

.github/workflows/make-release.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Based on https://github.com/im85288/service.upnext/blob/master/.github/workflows/release.yml
2+
name: Make Release
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
- '*.alpha*'
8+
- '*.beta*'
9+
10+
jobs:
11+
release:
12+
name: Make Release
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Release Status
17+
id: release
18+
run: |
19+
version=${GITHUB_REF/refs\/tags\//}
20+
if [[ $version == *.alpha* || $version == *.beta* ]] ;
21+
then
22+
echo ::set-output name=pre-release::true
23+
else
24+
echo ::set-output name=pre-release::false
25+
fi
26+
27+
- name: Checkout Add-on
28+
uses: actions/checkout@v3
29+
with:
30+
path: ${{ github.event.repository.name }}
31+
32+
- name: Install dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install libxml2-utils xmlstarlet zip
36+
37+
- name: Get Variables
38+
id: variables
39+
run: |
40+
changes=$(xmlstarlet sel -t -v '//news' -n addon.xml)
41+
changes="${changes//'%'/'%25'}"
42+
changes="${changes//$'\n'/'%0A'}"
43+
changes="${changes//$'\r'/'%0D'}"
44+
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
45+
echo ::set-output name=changes::$changes
46+
echo ::set-output name=version::$version
47+
working-directory: ${{ github.event.repository.name }}
48+
49+
- name: Create Zip
50+
id: zip
51+
run: |
52+
git reset
53+
git checkout .
54+
git clean -fdx
55+
mv .git ..
56+
rm -rf .??*
57+
rm LICENSE.txt
58+
cd ..
59+
filename=${{ github.event.repository.name }}-${{ steps.variables.outputs.version }}.zip
60+
zip -r $filename ${{ github.event.repository.name }}
61+
mv .git ${{ github.event.repository.name }}
62+
echo ::set-output name=filename::$filename
63+
working-directory: ${{ github.event.repository.name }}
64+
65+
- name: Create Release
66+
id: create-release
67+
uses: actions/create-release@v1
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
with:
71+
tag_name: ${{ github.ref }}
72+
release_name: ${{ github.ref }}
73+
body: ${{ steps.variables.outputs.changes }}
74+
draft: false
75+
prerelease: ${{ steps.release.outputs.pre-release }}
76+
77+
- name: Upload Zip (Matrix)
78+
id: upload-matrix
79+
uses: actions/upload-release-asset@v1
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
with:
83+
upload_url: ${{ steps.create-release.outputs.upload_url }}
84+
asset_name: ${{ steps.zip.outputs.filename }}
85+
asset_path: ${{ steps.zip.outputs.filename }}
86+
asset_content_type: application/zip
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Submit Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
release:
9+
if: github.repository == 'mikesilvo164/script.skinshortcuts'
10+
11+
name: Submit Release
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Add-on
16+
uses: actions/checkout@v3
17+
with:
18+
path: ${{ github.event.repository.name }}
19+
20+
- name: Set up Python 3.9
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.9'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install git+https://github.com/romanvm/kodi-addon-submitter.git
29+
30+
- name: Configure git
31+
run: |
32+
git config --global user.name "mikesilvo164"
33+
git config --global user.email "mikesilvo164@users.noreply.github.com"
34+
35+
- name: Remove Unwanted Files
36+
run: |
37+
mv .git ..
38+
rm -rf .??*
39+
mv ../.git .
40+
rm LICENSE.txt
41+
rm README.md
42+
rm -rf docs/
43+
git add .
44+
git commit -m "Remove unwanted files"
45+
working-directory: ${{ github.event.repository.name }}
46+
47+
- name: Submit to Official Repository
48+
id: submit
49+
run: |
50+
submit-addon -r repo-scripts -b matrix --pull-request ${{ github.event.repository.name }}
51+
working-directory: ${{ github.event.repository.name }}
52+
env:
53+
GH_USERNAME: mikesilvo164
54+
GH_TOKEN: ${{ secrets.ADDON_SUBMISSION_TOKEN }}
55+
EMAIL: mikesilvo164@users.noreply.github.com
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sync addon metadata translations
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
paths:
7+
- '**addon.xml'
8+
- '**resource.language.**strings.po'
9+
10+
jobs:
11+
default:
12+
if: github.repository == 'mikesilvo164/script.skinshortcuts'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
# Checkout the current repository into the 'project' directory
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
with:
21+
path: project
22+
23+
# Setup python version 3.9
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: '3.9'
28+
29+
# Install all dependencies required by the following steps
30+
# - git+https://github.com/xbmc/sync_addon_metadata_translations.git: main script for this action
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
python -m pip install git+https://github.com/xbmc/sync_addon_metadata_translations.git
35+
36+
# Run the sync-addon-metadata-translations against the 'project' directory
37+
- name: Run sync-addon-metadata-translations
38+
run: |
39+
sync-addon-metadata-translations
40+
working-directory: ./project
41+
42+
# Create a PR with any changes made by the sync-addon-metadata-translations script
43+
# - title/commit message: Sync of addon metadata translations
44+
# - body: Sync of addon metadata translations triggered by {github.sha}
45+
- name: Create PR for sync-addon-metadata-translations changes
46+
uses: peter-evans/create-pull-request@v3.10.0
47+
with:
48+
commit-message: Sync of addon metadata translations
49+
title: Sync of addon metadata translations
50+
body: Sync of addon metadata translations triggered by ${{ github.sha }}
51+
branch: amt-sync
52+
delete-branch: true
53+
path: ./project

0 commit comments

Comments
 (0)