Skip to content

Commit b4e4341

Browse files
Merge pull request #1 from RepoDevil/master
Update publish.yaml
2 parents 45d4169 + 22ce24a commit b4e4341

File tree

1 file changed

+56
-13
lines changed

1 file changed

+56
-13
lines changed

.github/workflows/publish.yaml

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,61 @@
11
name: '🚀 Publish Plugin'
2-
32
on:
4-
release:
5-
types:
6-
- released
73
workflow_dispatch:
84

5+
permissions:
6+
contents: write
7+
packages: write
8+
99
jobs:
10-
call:
11-
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/publish.yaml@master
12-
with:
13-
version: ${{ github.event.release.tag_name }}
14-
is-unstable: ${{ github.event.release.prerelease }}
15-
secrets:
16-
deploy-host: ${{ secrets.DEPLOY_HOST }}
17-
deploy-user: ${{ secrets.DEPLOY_USER }}
18-
deploy-key: ${{ secrets.DEPLOY_KEY }}
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Check for BETA file
17+
id: check-beta
18+
run: |
19+
if [ -f "BETA" ]; then
20+
echo "IS_BETA=true" >> $GITHUB_ENV
21+
else
22+
echo "IS_BETA=false" >> $GITHUB_ENV
23+
fi
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: 8.0.x
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: "lts/*"
34+
35+
- name: Restore Beta dependencies
36+
if: ${{env.IS_BETA == 'true' }}
37+
run: |
38+
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name jellyfin-pre "https://nuget.pkg.github.com/jellyfin/index.json"
39+
dotnet tool install --global dotnet-outdated-tool
40+
dotnet outdated -pre Always -u -inc Jellyfin
41+
42+
- name: Restore dependencies
43+
if: ${{env.IS_BETA == 'false' }}
44+
run: dotnet restore
45+
46+
- name: Run update version
47+
uses: intro-skipper/intro-skipper-action-ts@main
48+
with:
49+
task-type: "updateVersion"
50+
51+
- name: Build
52+
run: dotnet build --configuration Release --no-restore
53+
54+
- name: Create archive
55+
run: zip -j "Jellyfin.Plugin.MediaSegmentsApi-${{ env.NEW_FILE_VERSION }}.zip" Jellyfin.Plugin.MediaSegmentsApi/bin/Release/net8.0/Jellyfin.Plugin.MediaSegmentsApi.dll
56+
57+
- name: Create new release with tag
58+
if: github.event_name != 'pull_request'
59+
run: gh release create "v${{ env.NEW_FILE_VERSION }}" "Jellyfin.Plugin.MediaSegmentsApi-${{ env.NEW_FILE_VERSION }}.zip" --title "Release ${{ env.NEW_FILE_VERSION }}" --latest --generate-notes --target 10.10
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)