2022-06-10 16:14:09 -05:00
|
|
|
name: 'Build Plugin'
|
2022-06-10 16:19:07 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-04-09 22:08:39 -04:00
|
|
|
branches: [ "master" ]
|
2022-06-10 16:19:07 -05:00
|
|
|
pull_request:
|
2024-04-09 22:08:39 -04:00
|
|
|
branches: [ "master" ]
|
2024-04-19 14:49:47 -04:00
|
|
|
paths-ignore:
|
|
|
|
- '**/README.md'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'images/**'
|
|
|
|
- 'manifest.json'
|
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
|
2024-03-01 11:40:05 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2024-03-29 20:40:49 +01:00
|
|
|
packages: write
|
2024-03-01 11:40:05 -05:00
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
jobs:
|
|
|
|
build:
|
2024-04-10 07:26:03 -04:00
|
|
|
if: ${{ ! startsWith(github.event.head_commit.message, 'v0.') }}
|
2022-06-10 16:19:07 -05:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-10-02 13:10:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-10 16:25:44 -05:00
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
- name: Setup .NET
|
2024-01-01 15:04:34 +00:00
|
|
|
uses: actions/setup-dotnet@v4
|
2022-06-10 16:19:07 -05:00
|
|
|
with:
|
2024-03-22 23:41:58 +01:00
|
|
|
dotnet-version: 8.0.x
|
2022-06-10 16:25:44 -05:00
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
- name: Restore dependencies
|
2024-03-29 20:40:49 +01:00
|
|
|
run: |
|
2024-04-10 09:53:10 -04:00
|
|
|
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"
|
2024-03-29 20:40:49 +01:00
|
|
|
dotnet tool install --global dotnet-outdated-tool
|
|
|
|
dotnet outdated -pre Always -u -inc Jellyfin
|
2022-06-10 16:25:44 -05:00
|
|
|
|
2022-06-12 16:57:15 -05:00
|
|
|
- name: Embed version info
|
|
|
|
run: echo "${{ github.sha }}" > ConfusedPolarBear.Plugin.IntroSkipper/Configuration/version.txt
|
|
|
|
|
2024-03-01 11:40:05 -05:00
|
|
|
- name: Retrieve commit identification
|
|
|
|
run: |
|
|
|
|
GIT_HASH=$(git rev-parse --short HEAD)
|
|
|
|
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV
|
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
- name: Build
|
|
|
|
run: dotnet build --no-restore
|
2022-06-10 23:08:27 -05:00
|
|
|
|
2022-06-10 16:47:46 -05:00
|
|
|
- name: Upload artifact
|
2024-03-04 16:14:35 +00:00
|
|
|
uses: actions/upload-artifact@v4.3.1
|
2022-06-10 16:47:46 -05:00
|
|
|
with:
|
2024-03-06 09:08:04 -05:00
|
|
|
name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.GIT_HASH }}.dll
|
2024-03-29 20:40:49 +01:00
|
|
|
path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
2022-06-10 16:47:46 -05:00
|
|
|
if-no-files-found: error
|
2024-03-01 11:40:05 -05:00
|
|
|
|
|
|
|
- name: Create archive
|
2024-03-04 16:14:31 +00:00
|
|
|
uses: vimtor/action-zip@v1.2
|
2024-03-02 21:05:57 -05:00
|
|
|
if: github.event_name != 'pull_request'
|
2024-03-01 11:40:05 -05:00
|
|
|
with:
|
2024-03-06 19:10:57 -05:00
|
|
|
files: |
|
2024-03-29 20:40:49 +01:00
|
|
|
ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
2024-03-01 11:40:05 -05:00
|
|
|
dest: intro-skipper-${{ env.GIT_HASH }}.zip
|
|
|
|
|
2024-03-09 09:10:18 -05:00
|
|
|
- name: Generate md5
|
2024-03-09 09:14:39 -05:00
|
|
|
if: github.event_name != 'pull_request'
|
2024-03-29 20:40:49 +01:00
|
|
|
run: |
|
|
|
|
md5sum intro-skipper-${{ env.GIT_HASH }}.zip > intro-skipper-${{ env.GIT_HASH }}.md5
|
|
|
|
checksum="$(awk '{print $1}' intro-skipper-${{ env.GIT_HASH }}.md5)"
|
|
|
|
echo "CHECKSUM=$checksum" >> $GITHUB_ENV
|
2024-03-09 09:10:18 -05:00
|
|
|
|
2024-03-01 11:40:05 -05:00
|
|
|
- name: Publish prerelease
|
|
|
|
uses: 8bitDream/action-github-releases@v1.0.0
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
with:
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
2024-03-29 20:40:49 +01:00
|
|
|
automatic_release_tag: 10.9/preview
|
2024-03-01 11:40:05 -05:00
|
|
|
prerelease: true
|
|
|
|
title: intro-skipper-${{ env.GIT_HASH }}
|
|
|
|
files: |
|
|
|
|
intro-skipper-${{ env.GIT_HASH }}.zip
|
2024-03-29 20:40:49 +01:00
|
|
|
|
|
|
|
- name: Publish prerelease notes
|
|
|
|
uses: softprops/action-gh-release@v2.0.4
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
with:
|
|
|
|
tag_name: 10.9/preview
|
|
|
|
name: intro-skipper-${{ env.GIT_HASH }}
|
2024-03-31 15:54:54 -04:00
|
|
|
append_body: true
|
2024-03-29 20:40:49 +01:00
|
|
|
body: |
|
2024-03-31 15:54:54 -04:00
|
|
|
---
|
2024-03-29 20:40:49 +01:00
|
|
|
checksum: ${{ env.CHECKSUM }}
|
|
|
|
draft: false
|
|
|
|
prerelease: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|