Really fix CI
This commit is contained in:
parent
4fc79f39f7
commit
1101385107
@ -36,6 +36,29 @@ jobs:
|
||||
working-directory: build-${{ github.run_id }}
|
||||
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
||||
|
||||
- name: Compute build version
|
||||
id: version
|
||||
run: |
|
||||
# For PRs, stamp a distinct version so a side-loaded build is
|
||||
# identifiable in Jellyfin: 1.0.<YYYYMMDD>-pr<N>.<run_number>.
|
||||
# For plain master pushes, keep a date-based dev version.
|
||||
DATE=$(date -u +"%Y%m%d")
|
||||
if [ -n "${{ github.event.pull_request.number }}" ]; then
|
||||
VERSION="1.0.${DATE}.${{ github.run_number }}"
|
||||
LABEL="pr${{ github.event.pull_request.number }}"
|
||||
else
|
||||
VERSION="1.0.${DATE}.${{ github.run_number }}"
|
||||
LABEL="master"
|
||||
fi
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "label=${LABEL}" >> $GITHUB_OUTPUT
|
||||
echo "Build version: ${VERSION} (${LABEL})"
|
||||
|
||||
- name: Set build version
|
||||
working-directory: build-${{ github.run_id }}
|
||||
run: |
|
||||
sed -i "s/^version:.*/version: \"${{ steps.version.outputs.version }}\"/" build.yaml
|
||||
|
||||
- name: Build solution
|
||||
working-directory: build-${{ github.run_id }}
|
||||
run: dotnet build Jellyfin.Plugin.SRFPlay.sln --configuration Release --no-restore --no-self-contained /m:1
|
||||
@ -59,7 +82,7 @@ jobs:
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: jellyfin-srfplay-plugin
|
||||
name: srfplay-${{ steps.version.outputs.label }}-${{ steps.version.outputs.version }}
|
||||
path: build-${{ github.run_id }}/${{ steps.jprm.outputs.artifact }}
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
17
Directory.Build.targets
Normal file
17
Directory.Build.targets
Normal file
@ -0,0 +1,17 @@
|
||||
<Project>
|
||||
<!--
|
||||
The Jellyfin meta build workflow rewrites Directory.Build.props, stamping Version,
|
||||
AssemblyVersion and FileVersion all to a date-based value (e.g. 1.0.20260627.182).
|
||||
The build segment (20260627) exceeds the 16-bit limit (0-65535) that AssemblyVersion
|
||||
and FileVersion require, which fails the compile (CS7034/CS7035).
|
||||
|
||||
Directory.Build.targets is imported AFTER the project (and after Directory.Build.props),
|
||||
and the workflow does not touch it, so we force valid assembly/file versions here. The
|
||||
package/plugin manifest Version stays as injected; only the .NET assembly identity is
|
||||
normalised, which is fine because Jellyfin identifies plugins by GUID + manifest version.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -8,15 +8,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
|
||||
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
|
||||
<!--
|
||||
Pin AssemblyVersion/FileVersion to a valid major.minor.build.revision form. The Jellyfin
|
||||
meta build workflow injects a date-based package version (e.g. 1.0.20260627.179) whose
|
||||
build segment exceeds the 16-bit limit (0-65535) that AssemblyVersion/FileVersion require,
|
||||
which otherwise fails the compile (CS7034/CS7035). The injected -p:Version still applies to
|
||||
the package/plugin manifest; only the .NET assembly identity is pinned here.
|
||||
-->
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user