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

Library refactor and publish to nuget.org #43

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

IntelOrca
Copy link

Backstory

Back in April I started creating BioRand for Resident Evil 4 remake. The project is written in C# and I used code from this repository to generate the .pak files containing the modded content. I copied the necessary source files into my own repository as a library project that I could then reference from the randomizer project.

Today, I would like to now move this to a nuget package and publish it to nuget.org so that it can also be used by another biorand project for RE2R. It makes sense to commit my changes back here and have this repository publish to nuget.org so that we can get the latest updates and make it easy for anyone else to consume.

Changes

  • Created a single solution that contains all the projects.
  • Move all projects to SDK style. These are much nicer and don't contain all the boilerplate code in the csproj.
  • Extract common code between the packer and unpacker to a shared library project.
  • Add a GitHub CI workload so that GitHub automatically builds the nupkg and zip of the tools each commit.
    • Make it automatically create a release when the repository is tagged.
    • Attach the nupkg and tools zip to the release.
    • Publish the nupkg to nuget.org for other projects to consume.
  • Refactor some of the classes so that pak files can be created in memory.
  • Replace the native libzstd library with a .NET version ZstdSharp.Port.
    • This makes it more cross platform and straight forward to use as a library.

Creating a release

  1. Go to repository settings -> Actions -> General, then under Workflow permissions, check Read and write permissions.
  2. Go to repository settings -> Secrets and variables -> Actions -> Secrets -> New repository secret. Set name to NUGET_APIKEY and copy your nuget.org API key into the secret box.
  3. Increment the version in src\REE.PAK\REE.PAK.csproj.
  4. Tag the repository as v1.0.0 replacing the version number with the one in the csproj.
  5. Push the tag. GitHub will automatically build it and create the release on GitHub. You can then edit the release on GitHub, changing draft to publish.

It would be great if these changes could be incorporated and a nuget package be pushed to nuget.org for each release.
I am not sure how familiar you are with these processes, but I am happy to help with anything. I am also happy to be a maintainer if that is easier and publish the nupkg under my account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant