Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from Master #1197

Merged
merged 519 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
519 commits
Select commit Hold shift + click to select a range
5e6a2af
fix: set download images in body to true
revam Aug 27, 2024
2a738de
Update `DateTimeUpdated` everytime a group is updated
harshithmohan Aug 27, 2024
a70e5c8
fix: re-user series list
revam Aug 27, 2024
d3ab1a3
fix: also update stats when series name changes
revam Aug 27, 2024
00e0448
cleanup: `x.HasValue || x.Value` → `x ?? true`
revam Aug 27, 2024
6a351d0
Retry UDP command when session is invalid, add setting for UDP ping f…
harshithmohan Aug 27, 2024
7cd7013
cleanup: remove double `==` for easier readability
revam Aug 27, 2024
94f0398
feat: add skip if exists parameter
revam Aug 28, 2024
46dbed0
fix: lookup last parameter if the raw codec contains '/'
revam Aug 28, 2024
3c51d4b
Change default `keepExisting` value to false for TMDB auto-xref endpo…
harshithmohan Aug 29, 2024
1acc902
fix: don't map divx as mpeg4
revam Aug 29, 2024
a87f74d
fix: format can be null
revam Aug 29, 2024
8d4fd1b
refactor: fix up TMDB movie linking in the API
revam Aug 30, 2024
84fcc68
feat: add remote single/bulk get movie(s)/show(s) endpoints
revam Aug 30, 2024
a054f11
fix: fix `search` query parameter for local movies/shows
revam Aug 30, 2024
1fb3185
refactor: update tmdb export endpoint to support entity ids
revam Aug 30, 2024
78a3d35
fix: also reset show and ordering when resetting episode xrefs
revam Aug 30, 2024
c253af6
misc: insert spacing between sections
revam Aug 30, 2024
5a38547
fix: add simple locking to prevent concurrent updates of the same met…
revam Aug 30, 2024
f34fe61
fix: fix typo of namespace in abstraction
revam Aug 30, 2024
6b7279e
misc: expose anime type in comments in anidb/tmdb xref export
revam Aug 30, 2024
4ecc54c
misc: fix name of folder
revam Aug 30, 2024
f2b0405
refactor: simplify tmdb export entity selectors
revam Aug 30, 2024
03b770a
misc: enable nullable for APIv3 model helper
revam Aug 31, 2024
9a489fa
fxi: fix case where locations can be null in model helper
revam Aug 31, 2024
86ec5b5
fix: fix borked tvdb episode thumbnails in APIv1 & APIv2
revam Aug 31, 2024
fdf7686
fix: add option to only view episodes with no files which have aired
revam Aug 31, 2024
7294e30
fix: serialize language order as string in APIv3
revam Sep 1, 2024
d6e9c1e
fix: add missing tmdb migration
revam Sep 1, 2024
63c55d6
misc: better hot-reload support for launch task
revam Sep 1, 2024
21b702b
refactor: speed up initial download of TMDB shows
revam Sep 1, 2024
fcac5dd
misc: remove needless logging and task.run in tmdb tasks.
revam Sep 1, 2024
abc947d
refactor: move connectivity check to init controller
revam Sep 1, 2024
4e448ca
misc: add comment about 0 id
revam Sep 1, 2024
b5f170e
fix: force refresh for second run when doing a quick refresh first
revam Sep 1, 2024
124f83e
fix: use body for auto match save to db
revam Sep 1, 2024
3942fbe
fix: display auto match link generation duration as a time-span
revam Sep 1, 2024
35de16c
misc: update links for tmdb alternate ordering episode
revam Sep 1, 2024
b99bc82
misc: order season zero last
revam Sep 1, 2024
6ebe76e
fix: set match rating when overriding link
revam Sep 1, 2024
b9bc9e1
feat: add tmdb episode search
revam Sep 1, 2024
618bef8
fix: check min length before using array
revam Sep 1, 2024
bea1f6a
Fix language source order settings (reset to default), remove TVDB fr…
harshithmohan Sep 2, 2024
fb8bf5a
feat: add special support for specials in tmdb search query
revam Sep 2, 2024
ed85e32
fix: fix off-by-one error
revam Sep 2, 2024
cc8e14f
fix: reverse order for same air-date probability
revam Sep 2, 2024
83526ea
fix: always respect exact matches for title
revam Sep 2, 2024
24aac80
fix: hook up index for tmdb episode xrefs
revam Sep 2, 2024
842b858
refactor: change behavior of quick refresh
revam Sep 2, 2024
bbcdf22
fix: add en title/overviews on quick refresh
revam Sep 3, 2024
ed0b49e
fix: don't send null values to client(s)
revam Sep 3, 2024
bb21226
fix: distinct group ids before use
revam Sep 3, 2024
d750a74
fix: allow client to set the xref index when linking
revam Sep 4, 2024
fca212c
feat: add cross-reference episode groups endpoints
revam Sep 4, 2024
b898362
fix: keep verified xrefs even when hidden
revam Sep 4, 2024
ef67e5b
refactor: simplify/update episode auto matching logic
revam Sep 4, 2024
733a380
misc: remove extra .zip extension from GHA artifacts
revam Sep 4, 2024
0195009
fix: do keep existing links when auto linking
revam Sep 4, 2024
0ea549c
fix: properly schedule a background refresh when linking
revam Sep 4, 2024
75565a1
misc: use virtual property instead of extension method
revam Sep 4, 2024
d0bbfaf
fix: properly set ordering for anidb↔tmdb many-to-one episode xrefs
revam Sep 4, 2024
25d7369
fix: set index in xref episode groups
revam Sep 4, 2024
023f436
Fix docker container shutdown
harshithmohan Sep 5, 2024
01795b0
fix: fix no-link overrides with auto linking
revam Sep 6, 2024
9b4d8a4
misc: update label and switch case styles
revam Sep 6, 2024
e4f7161
feat: add css override support to the existing theme support
revam Sep 6, 2024
f0e3681
fix: use nested css for themes + allow css only themes
revam Sep 6, 2024
c2f3cb8
fix: properly only disable auto linking if an xref exists when removi…
revam Sep 7, 2024
dfd35e3
Fix crunchyroll link
harshithmohan Sep 7, 2024
15d2124
fix: `.Reverse()` → `.ThenBy`
revam Sep 7, 2024
f4b129a
fix: allow filtering to only "unlinked" episodes by setting the id to 0
revam Sep 7, 2024
566be8a
fix: don't send null id for unlinked episodes
revam Sep 7, 2024
00e8a0c
feat: expose all changed episodes in the series updated event
revam Sep 7, 2024
2bc8df7
cleanup: fix indent
revam Sep 7, 2024
04f79f0
misc: update job started logging for tmdb jobs
revam Sep 8, 2024
02f51e9
refactor: attempt to match using multiple titles per movie
revam Sep 8, 2024
7e9bf20
fix: don't run auto-search job if we have matches
revam Sep 8, 2024
be96357
refactor: also show existing matches when you request an auto-match r…
revam Sep 8, 2024
5fcb0eb
refactor: add two more "brute force" attempts per title per show
revam Sep 8, 2024
cbcdf72
refactor: less false positives and better matches for OADs/OVAs, etc.
revam Sep 8, 2024
50be6e0
fix: use episode thumbnail from any source in APIv2
revam Sep 8, 2024
e47bc8e
fix: add support for auto-matching "generic" movie entries
revam Sep 8, 2024
a7a9c73
fix: add missing type & titles to tmdb export with comments enabled
revam Sep 8, 2024
8ddc761
misc: remove unused and redundant methods in image utility
revam Sep 8, 2024
2dd1831
feat: add purge tvdb action
revam Sep 8, 2024
49c90ad
fix: don't count missing tvdb links in dashboard stats
revam Sep 8, 2024
e2f1fcc
fix: remove redundant check
revam Sep 9, 2024
f756686
fix: use all episodes if the anime is an OVA
revam Sep 9, 2024
12f5c8b
fix: use GET for purge action
revam Sep 9, 2024
a9813b1
fix: episode sort order in release management controller
revam Sep 9, 2024
ad136a3
cleanup: fix indent for switch case block statements in web ui contro…
revam Sep 9, 2024
d2ec8ee
refactor: add better local theme upload support
revam Sep 9, 2024
9bae1ff
feat: add manually linked filter for series episodes
revam Sep 10, 2024
b8add59
feat: expose plex usernames in APIv3 User DTO
revam Sep 10, 2024
80ddc60
fix: use single pipe for serialization
revam Sep 10, 2024
23d2c4d
refactor: improve anidb creator support
revam Sep 10, 2024
23ec3d4
fix: include fallback for web ui theme author name
revam Sep 10, 2024
0a566c0
fix: PlexUsers can be null
revam Sep 10, 2024
f24cf00
fix: don't download creator data if the setting is disabled
revam Sep 10, 2024
35eda86
fix: fix images for shoko character/staff DTOs in APIv3
revam Sep 10, 2024
48c8b5c
feat: expose anidb creators in APIv3 by id & name
revam Sep 10, 2024
f929cb9
misc: remove extra whitespace
revam Sep 10, 2024
a95eee8
feat: add id to Role.Staff in APIv3
revam Sep 10, 2024
1443d93
fix: add missing character info for tmdb cast
revam Sep 10, 2024
4069c8f
Update plex webhook to handle TMDB season/episode numbers, fix typo
harshithmohan Sep 11, 2024
63737ad
Do not retry login if first login attempt resulted in a ban
harshithmohan Sep 11, 2024
f469fb2
Try to fix queue getting stuck issue
harshithmohan Sep 11, 2024
39b4a86
Reschedule Jobs on Login or Ban Failure
da3dsoul Sep 12, 2024
e82a0e1
fix: gracefully handle NO_SUCH_CREATOR responses
revam Sep 12, 2024
12c136d
Throw NotLoggedInException when login fails *during job execution* in…
harshithmohan Sep 12, 2024
c334c7e
Docker: use recommended way of storing the gpg key for mediainfo, add…
harshithmohan Sep 12, 2024
ccfa60c
Remove `ScheduleAnidbCreators` db migration
harshithmohan Sep 12, 2024
eafdce5
API v3 User DTO: expose `PlexUsernames` as comma-separated string ins…
harshithmohan Sep 13, 2024
34f870d
Fix cross-platform plex sync, get episode data using both parent fold…
harshithmohan Sep 13, 2024
b19e001
Some changes to login state checking
da3dsoul Sep 14, 2024
3f15e55
Revert "Fix cross-platform plex sync, get episode data using both par…
Cazzar Sep 14, 2024
be1f03e
Fix an issue that can occur when logging in with the wrong encoding.
Cazzar Sep 14, 2024
4c02942
Save config when updating the server connection ID.
Cazzar Sep 14, 2024
9556b34
Make path to file respect the server separator character of the plex …
Cazzar Sep 14, 2024
010fd36
Allow unsetting all libraries in plex.
Cazzar Sep 14, 2024
e13b48a
Plex sync job: match file using parent folder + filename
harshithmohan Sep 14, 2024
7e85b1e
Don't require a script for WebAOM Renamer if Renaming isn't enabled
da3dsoul Sep 15, 2024
75ffe11
fix: creator data from the UDP API only contain 'x-jat' / 'ja' names
revam Sep 16, 2024
ba099aa
feat: add endpoint to schedule missing anidb creators
revam Sep 16, 2024
dd7d684
misc: sprinkle `.ConfigureAwait(false)`
revam Sep 16, 2024
270ba2c
feat: basic auto-scheduling of tmdb data updates
revam Sep 16, 2024
e28feb8
fix: re-use file-name-hash entries
revam Sep 16, 2024
b533c5c
fix: fix anime staff name if it's empty
revam Sep 17, 2024
7f43d4c
fix: fix marking files/episodes as not watched on anidb
revam Sep 19, 2024
bf2c5de
Fix `ValidateAllImagesJob` by using the correct job for tmdb images
harshithmohan Sep 20, 2024
19d4177
feat: add preferred ordering ID to tmdb shows
revam Sep 22, 2024
ba38fdd
chore: fix intent for switch cases
revam Sep 22, 2024
b1bdaa9
fix: filter cast/crew in model according to selected ordering
revam Sep 22, 2024
11b0b34
fix: reset cached titles when updating series stats
revam Sep 22, 2024
079f80b
fix: reset cached titles when adding/removing tmdb links
revam Sep 22, 2024
6b5b960
fix: distinct movies by id
revam Sep 22, 2024
3fb09af
Fix sqlserver db migration for preferred tmdb ordering ID
harshithmohan Sep 22, 2024
b6145ad
Fix MySQL migration with IF EXISTS
da3dsoul Sep 23, 2024
e776b8b
Add index length for renamers in MySQL
da3dsoul Sep 23, 2024
4319475
fix: don't assume series is not null
revam Sep 24, 2024
2f50967
fix: set default value for original name
revam Sep 24, 2024
73c372b
fix: only download select content ratings by default
revam Sep 24, 2024
6603b49
fix: up content rating limit for MySQL/MariaDB
revam Sep 24, 2024
02af85a
fix: up content rating limit for MS SQL Server
revam Sep 24, 2024
12c92df
fix: Fixes incorrect MySQL/MariaDB syntax
revam Sep 24, 2024
36e524a
fix: fix NPE in APIv3 Dashboard Controller
revam Sep 28, 2024
3485160
Improvements to WebAOMRenamer
da3dsoul Sep 28, 2024
4577af3
fix: download images during auto-scheduled tmdb updates
revam Sep 29, 2024
780a906
fix: skip auto-matching future episodes
revam Sep 29, 2024
c313c85
fix: more proper language support
revam Sep 29, 2024
1ea4c41
misc: add missing nullable indicator
revam Sep 29, 2024
a2c0340
fix: order APIv3 Images DTO before sending
revam Sep 29, 2024
b7e6e7a
Revert "fix: order APIv3 Images DTO before sending"
harshithmohan Sep 30, 2024
5b40055
feat: add direct file xrefs to tmdb episodes/movies
revam Oct 1, 2024
3e0a820
fix: only iterate tmdb movies for images once
revam Oct 1, 2024
4f29c9c
refactor: clean up get next episode internals + more
revam Oct 6, 2024
ae71d35
chore: `int Restricted` → `bool IsRestricted`
revam Oct 6, 2024
930c53b
refactor: add `.GetStream()` to abstraction and enable nullable
revam Oct 6, 2024
ee6842b
misc: split off archive upload
revam Oct 6, 2024
4552fdc
misc: update upload artifact actions to v4
revam Oct 6, 2024
a5ac6b3
misc: checkout repo in upload archive action
revam Oct 6, 2024
cc9da8c
feat: allow disabling relocation within destinations
revam Oct 7, 2024
ac602a2
fix: fix `IsRestricted` virtual property
revam Oct 7, 2024
da4fdc2
misc: adjust ftp path to new requirements
revam Oct 7, 2024
def62c7
misc: fix artifact path
revam Oct 7, 2024
457f369
Fix Upload Path.
ElementalCrisis Oct 8, 2024
9edaf03
fix: don't display parent anime if it's not provided
revam Oct 10, 2024
4470e52
fix: make sure anidb events are in universal time
revam Oct 10, 2024
88e0a0f
misc: update description for IVideoFile.RelativePath
revam Oct 10, 2024
36043df
fix: don't assume directory name is not nullable
revam Oct 10, 2024
7fb9f33
fix: ensure en-US content ratings exist at all times if available
revam Oct 10, 2024
66050d2
fix: add thumbnail to episode image types in api v3
revam Oct 11, 2024
e369f2b
feat: add filter series ids endpoints
revam Oct 12, 2024
b645f8d
feat: add import folder filters (#1184)
revam Oct 12, 2024
2186e45
Fix the build output path in windows installer script
harshithmohan Oct 12, 2024
26b194d
fix 404 from webui version check (#1185)
Terrails Oct 12, 2024
4573204
fix: fix app slug in windows installer
revam Oct 12, 2024
c570d0f
Update ShokoServer.iss
ElementalCrisis Oct 12, 2024
76da970
bump abstraction
revam Oct 12, 2024
c016174
refactor: remove TvDB support from server
revam Oct 13, 2024
d3df135
fix: fix database command
revam Oct 13, 2024
1ddec53
fix: add back TvDB IDs for series links in APIv2
revam Oct 13, 2024
0cfc5d4
feat: add "fake" tmdb season xrefs for series
revam Oct 13, 2024
4539c82
misc: update daily workflow
revam Oct 13, 2024
7ca0b07
misc: update stable workflow
revam Oct 13, 2024
b7d3a4e
fix: expose width/height for `IImageMetadata` impl.
revam Oct 13, 2024
1c392eb
Fix mssql migration for adding `TmdbShowID` to `Trakt_Show` table
harshithmohan Oct 14, 2024
28abed7
cleanup: remove unused anidb settings
revam Oct 17, 2024
c2d79aa
misc: tweak default anidb settings
revam Oct 17, 2024
a5d0e02
fix: always re-evaluate non-DT/OV links + more
revam Oct 17, 2024
69b817e
feat: add genres to remote search results + more
revam Oct 17, 2024
98aa738
feat: add bool equals and constant expressions
revam Oct 17, 2024
d79b2d5
feat: add available/preferred image type expressions
revam Oct 19, 2024
0da092d
fix: add back backdrops for filter presets in APIv2
revam Oct 20, 2024
ac81733
fix: hide files in import limbo (again)
revam Oct 20, 2024
a4d1223
fix: fix auto linking re-evaluation
revam Oct 20, 2024
5bc8be0
fix: fix filtering of episodes in second pass
revam Oct 20, 2024
3635a46
fix: don't limit title search to 1 result in tmdb episode linking
revam Oct 20, 2024
34a3e4a
fix: fix match field of search result in internal search util
revam Oct 20, 2024
e572640
repo: use git tags for version tracking
revam Oct 20, 2024
7df1758
repo: change push tag action
revam Oct 20, 2024
723b20a
Fix Queue Serialization error. QueueItem Details must be a serializab…
da3dsoul Oct 20, 2024
b5832e3
repo: add tag to daily releases
revam Oct 20, 2024
808d7ae
refactor: update internal model for web ui version info
revam Oct 20, 2024
32ae459
refactor: only check if a zip is attached
revam Oct 20, 2024
46ebde4
refactor: update dev version check
revam Oct 20, 2024
7b4273f
fix: inverse boolean logic for import limbo check
revam Oct 20, 2024
d72f0b1
fix: don't transform web ui version
revam Oct 20, 2024
355183d
fix: clear queue after tvdb removal
revam Oct 20, 2024
40b09c7
Add workflow to cleanup untagged docker images [no ci]
harshithmohan Oct 20, 2024
c77f76a
fix: distinct images
revam Oct 21, 2024
a5ca437
Update README.md
da3dsoul Oct 21, 2024
ef43f1e
Update README.md
da3dsoul Oct 21, 2024
7c760e2
feat: add generated playlist service
revam Oct 22, 2024
db9a9a6
feat: add query filter for unaired episodes
revam Oct 22, 2024
b0ae6be
fix: fix inverse boolean logic
revam Oct 22, 2024
b0779a7
fix: add episode number to video title in playlist
revam Oct 22, 2024
e1abd9f
fix: use series title then episode title for video title in playlist
revam Oct 22, 2024
c2ca416
chore: enable nullable on APIv3 series controller
revam Oct 24, 2024
f3bc104
feat: add a generated playlist controller
revam Oct 24, 2024
3013fcf
feat: expose part number to plugins and display it on the episode num…
revam Oct 24, 2024
991ac1c
fix: ensure only 1 xref per company exist
revam Oct 25, 2024
9182c13
refactor: change generated playlists (again)
revam Oct 26, 2024
0d633f6
refactor: append api key to streams in playlist
revam Oct 27, 2024
aac6789
fix: use the uri instead of the uri builder in the final playlist entry
revam Oct 28, 2024
e836426
chore(deps): bump MessagePack from 2.5.140 to 2.5.187 in /Shoko.Server
dependabot[bot] Oct 17, 2024
552259c
fix: remove stall entry during relocation
revam Oct 30, 2024
4a5598f
fix: always remove files from the file watcher exception list after t…
revam Oct 30, 2024
5be796c
feat: add PATCH endpoint for file user stats in APIv3
revam Oct 30, 2024
c3cce2f
misc: add get method for scrobble endpoint in APIv3
revam Oct 30, 2024
2e08d8c
fix: make AniDB api calls more preservative
revam Oct 30, 2024
f06a89b
fix: non-blocking rate-limit for anidb commands
revam Oct 30, 2024
963a641
fix: always use short delay for anidb ping commands
revam Oct 30, 2024
49705f6
fix: don't send xrefs for non-existing files in APIv3
revam Oct 31, 2024
62c49b1
fix: get top level groups for groups matching the filter
revam Oct 31, 2024
6c2cebf
fix: search all group names
revam Oct 31, 2024
94045ad
fix: attempt to auto match by title plus year first, then only title
revam Oct 31, 2024
31e56e9
fix: better episode selection logic in playlist for videos
revam Nov 1, 2024
5c36776
fix: add fast paths for 1 and 0 xrefs in playlist for videos
revam Nov 1, 2024
9cc0c51
refactor: make AniDB rate limiting configurable
revam Nov 3, 2024
ef1a16c
refactor: better handling of case sensitivity in paths across platfor…
revam Nov 3, 2024
359d7a4
fix: don't drop xrefs if we're unable to get the anime id
revam Nov 3, 2024
87983f2
fix: fix casing for anidb episode udp command
revam Nov 3, 2024
2014ab7
repo: change shoko home for vscode debug env
revam Nov 3, 2024
873f85b
fix: remove unneeded comparer on custom tags in filter expression
revam Oct 25, 2024
abdeb2c
Fix TestFilterable.cs
da3dsoul Nov 4, 2024
8442a50
revert: revert "refactor: better handling of case sensitivity in path…
revam Nov 4, 2024
d9f2faa
fix: exclude the linked episodes from the auto-match candidates
revam Nov 5, 2024
a2dabcd
refactor: add 3rd pass for tmdb episode linking
revam Nov 5, 2024
d66b282
Fix relation depth comparison in GetAniDBAnimeJob
harshithmohan Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ csharp_new_line_between_query_expression_clauses = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
csharp_indent_labels = no_change

# Whitespace options
csharp_style_allow_embedded_statements_on_same_line_experimental = false
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ReplaceTmdbApiKey.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Param(
[string] $apiKey = "TMDB_API_KEY_GOES_HERE"
)

$filename = "./Shoko.Server/Server/Constants.cs"
$searchString = "TMDB_API_KEY_GOES_HERE"

(Get-Content $filename) | ForEach-Object {
$_ -replace $searchString, $apiKey
} | Set-Content $filename
138 changes: 102 additions & 36 deletions .github/workflows/build-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,59 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
current_info:
runs-on: ubuntu-latest

name: Current Information

outputs:
tag: ${{ steps.release_info.outputs.tag }}
version: ${{ steps.release_info.outputs.version }}
date: ${{ steps.commit_date_iso8601.outputs.date }}
sha: ${{ github.sha }}
sha_short: ${{ steps.commit_info.outputs.sha }}

steps:
- name: Checkout master
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"
submodules: recursive
fetch-depth: 0 # This is set to download the full git history for the repo

- name: Get Commit Date (as ISO8601)
id: commit_date_iso8601
shell: bash
env:
TZ: UTC0
run: |
echo "date=$(git --no-pager show -s --date='format-local:%Y-%m-%dT%H:%M:%SZ' --format=%cd ${{ github.sha }})" >> "$GITHUB_OUTPUT"

- name: Get Previous Version
id: previous_release_info
uses: revam/gh-action-get-tag-and-version@v1
with:
branch: false
prefix: "v"
prefixRegex: "[vV]?"
suffixRegex: "dev"
suffix: "dev"

- name: Get Current Version
id: release_info
uses: revam/gh-action-get-tag-and-version@v1
with:
branch: true
prefix: v
branch: false
increment: "suffix"
prefix: "v"
prefixRegex: "[vV]?"
suffixRegex: "dev"
suffix: "dev"

- name: Get Commit Date (as ISO8601)
id: commit_date_iso8601
shell: bash
run: |
echo "date=$(git --no-pager show -s --format=%aI ${{ github.sha }})" >> "$GITHUB_OUTPUT"
- id: commit_info
name: Shorten Commit Hash
uses: actions/github-script@v6
Expand Down Expand Up @@ -67,7 +87,7 @@ jobs:
name: Build CLI — ${{ matrix.build_type }} ${{ matrix.rid }} (Daily)

steps:
- name: Checkout master
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"
Expand All @@ -77,6 +97,7 @@ jobs:
shell: pwsh
run: |
./.github/workflows/ReplaceSentryDSN.ps1 -dsn ${{ secrets.SENTRY_DSN }}
./.github/workflows/ReplaceTmdbApiKey.ps1 -apiKey ${{ secrets.TMDB_API }}
./.github/workflows/ReplaceAVD3URL.ps1 -url ${{ secrets.AVD3_URL }}

- name: Set up QEMU
Expand All @@ -90,12 +111,12 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet }}

- run: dotnet publish -c Release -r ${{ matrix.rid }} -f net8.0 ${{ matrix.build_props }} Shoko.CLI /p:Version="${{ needs.current_info.outputs.version }}" /p:InformationalVersion="\"channel=dev,commit=${{ needs.current_info.outputs.sha }},date=${{ needs.current_info.outputs.date }},\""
- run: dotnet publish -c Release -r ${{ matrix.rid }} -f net8.0 ${{ matrix.build_props }} Shoko.CLI /p:Version="${{ needs.current_info.outputs.version }}" /p:InformationalVersion="\"channel=dev,commit=${{ needs.current_info.outputs.sha }},tag=${{ needs.current_info.outputs.tag }},date=${{ needs.current_info.outputs.date }},\""

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Shoko.CLI_${{ matrix.build_type }}_${{ matrix.rid }}.zip
name: Shoko.CLI_${{ matrix.build_type }}_${{ matrix.rid }}
path: Shoko.Server/bin/Release/net8.0/${{matrix.rid}}/publish/

tray-service-daily:
Expand All @@ -109,7 +130,7 @@ jobs:
dotnet: [ '8.x' ]
build_type: ['Standalone', 'Framework']
include:
- build_props: '-r win-x64 --self-contained true -f net8.0-windows'
- build_props: '-r win-x64 --self-contained true'
build_type: 'Standalone'
- build_dir: '/net8.0-windows/win-x64'
build_type: 'Standalone'
Expand All @@ -121,7 +142,7 @@ jobs:
name: Build Tray Service ${{ matrix.build_type }} (Daily)

steps:
- name: Checkout master
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"
Expand All @@ -131,33 +152,28 @@ jobs:
shell: pwsh
run: |
.\\.github\\workflows\\ReplaceSentryDSN.ps1 -dsn ${{ secrets.SENTRY_DSN }}
.\\.github\\workflows\\ReplaceTmdbApiKey.ps1 -apiKey ${{ secrets.TMDB_API }}
.\\.github\\workflows\\ReplaceAVD3URL.ps1 -url ${{ secrets.AVD3_URL }}

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}

- run: dotnet publish -c Release ${{ matrix.build_props }} Shoko.TrayService /p:Version="${{ needs.current_info.outputs.version }}" /p:InformationalVersion="channel=dev%2ccommit=${{ needs.current_info.outputs.sha }}%2cdate=${{ needs.current_info.outputs.date }}%2c" # %2c is comma, blame windows/pwsh
- run: dotnet publish -c Release ${{ matrix.build_props }} Shoko.TrayService /p:Version="${{ needs.current_info.outputs.version }}" /p:InformationalVersion="channel=dev%2ccommit=${{ needs.current_info.outputs.sha }}%2ctag=${{ needs.current_info.outputs.tag }}%2cdate=${{ needs.current_info.outputs.date }}%2c" # %2c is comma, blame windows/pwsh

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Shoko.TrayService_${{ matrix.build_type }}_win-x64.zip
name: Shoko.TrayService_${{ matrix.build_type }}_win-x64
path: Shoko.Server/bin/Release${{ matrix.build_dir }}/publish/

- name: Upload to shokoanime.com
if: ${{ matrix.build_type == 'Standalone' }}
shell: pwsh
env:
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
FTP_SERVER: ${{ secrets.FTP_SERVER }}
run : Compress-Archive .\\Shoko.Server\\bin\\Release\\net8.0-windows\\win-x64\\publish .\\ShokoServer.zip && .\\.github\\workflows\\UploadArchive.ps1

docker-daily-build:
runs-on: ubuntu-latest

needs:
- current_info

strategy:
fail-fast: false
matrix:
Expand All @@ -170,11 +186,8 @@ jobs:

name: Build Docker Image - ${{ matrix.arch }} (Daily)

needs:
- current_info

steps:
- name: Checkout master
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"
Expand All @@ -184,6 +197,7 @@ jobs:
shell: pwsh
run: |
./.github/workflows/ReplaceSentryDSN.ps1 -dsn ${{ secrets.SENTRY_DSN }}
./.github/workflows/ReplaceTmdbApiKey.ps1 -apiKey ${{ secrets.TMDB_API }}
./.github/workflows/ReplaceAVD3URL.ps1 -url ${{ secrets.AVD3_URL }}

- uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -226,6 +240,7 @@ jobs:
channel=dev
commit=${{ needs.current_info.outputs.sha }}
date=${{ needs.current_info.outputs.date }}
tag=${{ needs.current_info.outputs.tag }}
provenance: false

docker-daily-push_manifest:
Expand Down Expand Up @@ -260,7 +275,7 @@ jobs:
docker manifest push ghcr.io/${{ secrets.DOCKER_REPO }}:daily
docker manifest push ${{ secrets.DOCKER_REPO }}:daily

sentry-upload:
add-tag:
runs-on: ubuntu-latest

needs:
Expand All @@ -269,17 +284,39 @@ jobs:
- tray-service-daily
- docker-daily-push_manifest

name: Add tag for pre-release

steps:
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"
submodules: recursive

- name: Push pre-release tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ needs.current_info.outputs.tag }}
message: Shoko Server v${{ needs.current_info.outputs.version }} Pre-Release

sentry-upload:
runs-on: ubuntu-latest

needs:
- current_info
- add-tag

name: Upload version info to Sentry.io

steps:
- name: Checkout master
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"
submodules: recursive

# Only add the release to sentry if the build is successful.
- name: Push Sentry Release "${{ needs.current_info.outputs.version }}-dev-${{ needs.current_info.outputs.sha_short }}"
- name: Push Sentry Release "${{ needs.current_info.outputs.version }}"
uses: getsentry/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -288,7 +325,36 @@ jobs:
# SENTRY_URL: https://sentry.io/
with:
environment: 'dev'
version: ${{ needs.current_info.outputs.version }}-dev-${{ needs.current_info.outputs.sha_short }}
version: ${{ needs.current_info.outputs.version }}

upload-site:
runs-on: windows-latest
continue-on-error: true

needs:
- sentry-upload

name: Upload archive to site

steps:
- name: Checkout "${{ github.ref }}"
uses: actions/checkout@master
with:
ref: "${{ github.sha }}"

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Shoko.TrayService_Standalone_win-x64
path: ShokoServer

- name: Upload daily archive to site
shell: pwsh
env:
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
FTP_SERVER: ${{ secrets.FTP_SERVER }}
run : Compress-Archive .\\ShokoServer .\\ShokoServer.zip && .\\.github\\workflows\\UploadArchive.ps1

discord-notify:
runs-on: ubuntu-latest
Expand All @@ -306,7 +372,7 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
RELEASE_VERSION: ${{ needs.current_info.outputs.version }}-dev-${{ needs.current_info.outputs.sha_short }}
RELEASE_VERSION: ${{ needs.current_info.outputs.version }}
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "CHANGELOG<<$EOF" >> "$GITHUB_OUTPUT"
Expand All @@ -326,7 +392,7 @@ jobs:
embed-author-icon-url: https://raw.githubusercontent.com/${{ github.repository }}/master/.github/images/Shoko.png
embed-author-url: https://github.com/${{ github.repository }}
embed-description: |
**Version**: `${{ needs.current_info.outputs.version }}-dev-${{ needs.current_info.outputs.sha_short }}`
**Version**: `${{ needs.current_info.outputs.version }}` (`${{ needs.current_info.outputs.sha_short }}`)

Update by grabbing the latest daily from [our site](https://shokoanime.com/downloads/shoko-server) or through Docker using the `shokoanime/server:daily` tag!

Expand Down
Loading
Loading