fix: again
This commit is contained in:
@@ -10,19 +10,24 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build Plugin + Update Manifest
|
name: Build Plugin + Update Manifest
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GT_TOKEN }}
|
token: ${{ secrets.GT_TOKEN }}
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: '9.0.x'
|
dotnet-version: '9.0.x'
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Set version from tag
|
- name: Set version from tag
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
@@ -30,31 +35,28 @@ jobs:
|
|||||||
VERSION="${TAG#v}" # Remove 'v' prefix
|
VERSION="${TAG#v}" # Remove 'v' prefix
|
||||||
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||||
echo "TAG=$TAG" >> "$GITHUB_ENV"
|
echo "TAG=$TAG" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Install JPRM
|
||||||
run: dotnet restore
|
run: pip install jprm
|
||||||
|
|
||||||
- name: Build plugin
|
- name: Build plugin with JPRM
|
||||||
run: |
|
run: |
|
||||||
dotnet publish Jellyfin.Plugin.SmartNotify/Jellyfin.Plugin.SmartNotify.csproj \
|
jprm --verbosity=debug plugin build Jellyfin.Plugin.SmartNotify \
|
||||||
--configuration Release \
|
--dotnet-framework="net9.0" \
|
||||||
--output ./publish \
|
--version="${VERSION}.0" \
|
||||||
-p:Version=${VERSION}.0
|
--output=./artifacts
|
||||||
|
|
||||||
- name: Create plugin ZIP
|
- name: Prepare artifact
|
||||||
run: |
|
run: |
|
||||||
# Only include plugin DLL and actual dependencies (not Jellyfin framework DLLs)
|
# Find the ZIP that JPRM created
|
||||||
cd publish
|
ARTIFACT=$(ls artifacts/*.zip | head -1)
|
||||||
zip ../smartnotify_${VERSION}.zip \
|
cp "$ARTIFACT" "smartnotify_${VERSION}.zip"
|
||||||
Jellyfin.Plugin.SmartNotify.dll \
|
|
||||||
LiteDB.dll
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# Calculate MD5 checksum
|
# Calculate MD5 checksum
|
||||||
CHECKSUM=$(md5sum smartnotify_${VERSION}.zip | cut -d' ' -f1)
|
CHECKSUM=$(md5sum "smartnotify_${VERSION}.zip" | cut -d' ' -f1)
|
||||||
echo "CHECKSUM=$CHECKSUM" >> "$GITHUB_ENV"
|
echo "CHECKSUM=$CHECKSUM" >> "$GITHUB_ENV"
|
||||||
echo "Checksum: $CHECKSUM"
|
echo "Checksum: $CHECKSUM"
|
||||||
|
|
||||||
- name: Upload ZIP to Release
|
- name: Upload ZIP to Release
|
||||||
env:
|
env:
|
||||||
GIT_TOKEN: ${{ secrets.GT_TOKEN }}
|
GIT_TOKEN: ${{ secrets.GT_TOKEN }}
|
||||||
@@ -62,13 +64,13 @@ jobs:
|
|||||||
# Get release ID
|
# Get release ID
|
||||||
RELEASE_ID=$(curl -s "https://git.tdpi.dev/api/v1/repos/TDPI/jellyfin-plugin-smartnotify/releases/tags/${TAG}" \
|
RELEASE_ID=$(curl -s "https://git.tdpi.dev/api/v1/repos/TDPI/jellyfin-plugin-smartnotify/releases/tags/${TAG}" \
|
||||||
-H "Authorization: token $GIT_TOKEN" | jq -r '.id')
|
-H "Authorization: token $GIT_TOKEN" | jq -r '.id')
|
||||||
|
|
||||||
# Upload asset
|
# Upload asset
|
||||||
curl -X POST "https://git.tdpi.dev/api/v1/repos/TDPI/jellyfin-plugin-smartnotify/releases/${RELEASE_ID}/assets?name=smartnotify_${VERSION}.zip" \
|
curl -X POST "https://git.tdpi.dev/api/v1/repos/TDPI/jellyfin-plugin-smartnotify/releases/${RELEASE_ID}/assets?name=smartnotify_${VERSION}.zip" \
|
||||||
-H "Authorization: token $GIT_TOKEN" \
|
-H "Authorization: token $GIT_TOKEN" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary @smartnotify_${VERSION}.zip
|
--data-binary @smartnotify_${VERSION}.zip
|
||||||
|
|
||||||
- name: Update manifest.json
|
- name: Update manifest.json
|
||||||
env:
|
env:
|
||||||
GIT_TOKEN: ${{ secrets.GT_TOKEN }}
|
GIT_TOKEN: ${{ secrets.GT_TOKEN }}
|
||||||
@@ -76,14 +78,14 @@ jobs:
|
|||||||
# Get changelog for this version
|
# Get changelog for this version
|
||||||
CHANGELOG=$(awk '/^## '"$VERSION"'/{flag=1} /^## / && flag && !/^## '"$VERSION"'/{exit} flag' CHANGELOG.md | tail -n +2)
|
CHANGELOG=$(awk '/^## '"$VERSION"'/{flag=1} /^## / && flag && !/^## '"$VERSION"'/{exit} flag' CHANGELOG.md | tail -n +2)
|
||||||
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
|
||||||
# Update manifest.json with new version
|
# Update manifest.json with new version
|
||||||
python3 << EOF
|
python3 << EOF
|
||||||
import json
|
import json
|
||||||
|
|
||||||
with open('manifest.json', 'r') as f:
|
with open('manifest.json', 'r') as f:
|
||||||
manifest = json.load(f)
|
manifest = json.load(f)
|
||||||
|
|
||||||
new_version = {
|
new_version = {
|
||||||
"version": "${VERSION}.0",
|
"version": "${VERSION}.0",
|
||||||
"changelog": """${CHANGELOG}""".strip(),
|
"changelog": """${CHANGELOG}""".strip(),
|
||||||
@@ -92,26 +94,26 @@ jobs:
|
|||||||
"checksum": "${CHECKSUM}",
|
"checksum": "${CHECKSUM}",
|
||||||
"timestamp": "${TIMESTAMP}"
|
"timestamp": "${TIMESTAMP}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Insert at beginning of versions array
|
# Insert at beginning of versions array
|
||||||
manifest[0]["versions"].insert(0, new_version)
|
manifest[0]["versions"].insert(0, new_version)
|
||||||
|
|
||||||
# Keep only last 10 versions
|
# Keep only last 10 versions
|
||||||
manifest[0]["versions"] = manifest[0]["versions"][:10]
|
manifest[0]["versions"] = manifest[0]["versions"][:10]
|
||||||
|
|
||||||
with open('manifest.json', 'w') as f:
|
with open('manifest.json', 'w') as f:
|
||||||
json.dump(manifest, f, indent=2, ensure_ascii=False)
|
json.dump(manifest, f, indent=2, ensure_ascii=False)
|
||||||
|
|
||||||
print("Manifest updated successfully")
|
print("Manifest updated successfully")
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Commit and push manifest
|
# Commit and push manifest
|
||||||
git config user.name "Gitea Actions"
|
git config user.name "Gitea Actions"
|
||||||
git config user.email "actions@git.tdpi.dev"
|
git config user.email "actions@git.tdpi.dev"
|
||||||
git add manifest.json
|
git add manifest.json
|
||||||
git commit -m "chore: update manifest for ${TAG}"
|
git commit -m "chore: update manifest for ${TAG}"
|
||||||
git push https://x-access-token:${GIT_TOKEN}@git.tdpi.dev/TDPI/jellyfin-plugin-smartnotify.git HEAD:main
|
git push https://x-access-token:${GIT_TOKEN}@git.tdpi.dev/TDPI/jellyfin-plugin-smartnotify.git HEAD:main
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
|
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|||||||
@@ -13,17 +13,19 @@
|
|||||||
<AnalysisMode>Default</AnalysisMode>
|
<AnalysisMode>Default</AnalysisMode>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Jellyfin 10.11 references -->
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Jellyfin.Controller" Version="10.11.*" />
|
<PackageReference Include="Jellyfin.Controller" Version="10.11.*">
|
||||||
<PackageReference Include="Jellyfin.Model" Version="10.11.*" />
|
<ExcludeAssets>runtime</ExcludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Jellyfin.Model" Version="10.11.*">
|
||||||
|
<ExcludeAssets>runtime</ExcludeAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="LiteDB" Version="5.0.21" />
|
<PackageReference Include="LiteDB" Version="5.0.21" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Embedded Resources -->
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Configuration\configPage.html" />
|
<None Remove="Configuration\configPage.html" />
|
||||||
<EmbeddedResource Include="Configuration\configPage.html" />
|
<EmbeddedResource Include="Configuration\configPage.html" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
14
build.yaml
Normal file
14
build.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: "SmartNotify"
|
||||||
|
guid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
||||||
|
targetAbi: "10.11.0.0"
|
||||||
|
framework: "net9.0"
|
||||||
|
overview: "Intelligent Discord notifications for new media"
|
||||||
|
description: >
|
||||||
|
Smart Discord notifications that detect quality upgrades vs truly new content.
|
||||||
|
Groups episodes intelligently (e.g., 'Episode 1-12 added').
|
||||||
|
category: "Notifications"
|
||||||
|
owner: "TDPI"
|
||||||
|
artifacts:
|
||||||
|
- "Jellyfin.Plugin.SmartNotify.dll"
|
||||||
|
- "LiteDB.dll"
|
||||||
|
changelog: ""
|
||||||
Reference in New Issue
Block a user