For easier integration into docker buildx, Recyclarr is now built inside
of the Dockerfile as a dedicated build stage. This simplified the CI
workflows and local testing a bit.
The changes for this new process were driven by Microsoft's recommended
approach to building .NET applications inside Docker, which is
documented here:
https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md
Use the fork again until the upstream starts merging pull requests. It
is out of date with its forks. The main motivation for this change is to
get off the now deprecated Node v16.
The Apple Signing step grabs an existing artifact, signs the binaries,
and then re-uploads the artifact, replacing the original one. The
upgrade to v4 of the `actions/upload-artifact` action broke this
behavior due to a breaking change documented in [the release notes][1]:
> Due to how Artifacts are created in this new version, it is no longer
> possible to upload to the same named Artifact multiple times. You must
> either split the uploads into multiple Artifacts with different names,
> or only upload once. Otherwise you will encounter an error.
The fix is to use the `overwrite: true` setting to force the old
behavior of replacing the previous (unsigned) artifact.
[1]: https://github.com/actions/upload-artifact/blob/main/README.md#breaking-changes
- Remove schemas because there doesn't seem to be any jobs that operate
on these files. I don't remember the reason that it was added in the
first place; but can deal with that later if I notice something wrong.
- Add props/targets files so that we rebuild when we update package
versions, etc.
- Use `sonar.token` instead of `sonar.login` since the latter is
deprecated.
- Explicitly install Java 17 since v11 (bundled by default) is
deprecated by Sonarcloud.
Caching was not implemented this time around because it's not possible
to cache analysis results yet, only the installed binaries. See this
thread for information:
https://community.sonarsource.com/t/proper-caching-for-ci-builds/98320/2
In addition:
- URL processing is now data driven. It pulls URLs from the latest
Github Release and uses those. This makes the notification more
extensible. If we add new artifacts later to the release, they
"automatically" get published in the discord notification as well. New
platforms must still be explicitly added, though.
- Added contributing guidance for testing the notification script.
Due to [an issue][1] with the `actions/upload-artifact` action, when
binaries are uploaded they lose permission bits and `xattr` properties.
Composite actions `upload-tar` and `download-tar` have been added that
tarball the artifacts before uploading them to retain those properties.
[1]: https://github.com/actions/upload-artifact/issues/38
Changelog:
- Sign & notarize Recyclarr on macOS platforms (arm64, x64)
- Use `tar.xz` instead of `zip` on mac & linux platforms
- Compile linux binaries on the ubuntu-latest Github runner
- Compile macOS binaries on the macos-latest Github runner
- Executable size reduced by disabling ReadyToRun
Fixes#39