Really fix CI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user