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

Refactor project structure to improve build and release processes #78

Merged
merged 19 commits into from
Dec 19, 2024

Conversation

albertospelta
Copy link
Collaborator

This pull request includes significant changes to the CI/CD workflows and project structure for the Dax.Vpax.Obfuscator solution. The changes involve renaming and restructuring workflow files, updating solution files, and modifying project configurations to improve build and release processes.

CI/CD Workflow Updates:

  • Renamed .github/workflows/ci.yml to .github/workflows/ci-obfuscator-cli.yml and updated it to target the main branch and paths related to Dax.Vpax.Obfuscator.CLI. Introduced the SOLUTION environment variable for reuse in build steps. [1] [2]
  • Added new workflow files: .github/workflows/ci-obfuscator-common.yml for Dax.Vpax.Obfuscator.Common and .github/workflows/ci-obfuscator.yml for the main obfuscator and tokenizer projects, each with their respective paths and solution files. [1] [2]
  • Updated .github/workflows/release-obfuscator-cli.yml, .github/workflows/release-obfuscator-common.yml, and .github/workflows/release-obfuscator.yml to use more specific environment variables (PROJECT_NAME, PROJECT_PATH, PROJECT_FILE) and streamlined the release process. [1] [2] [3] [4] [5] [6]

Solution and Project File Changes:

  • Removed Dax.Vpax.Obfuscator.CI.slnf and created separate solution filter files for CLI, Common, and main projects (Dax.Vpax.Obfuscator.CLI.slnf, Dax.Vpax.Obfuscator.Common.slnf, Dax.Vpax.Obfuscator.slnf). [1] [2] [3] [4]
  • Renamed Dax.Vpax.Obfuscator.sln to Vpax-Obfuscator.sln and updated project references and configurations accordingly. [1] [2]

Configuration and Script Updates:

  • Added packageSourceMapping to nuget.config to ensure proper package source resolution.
  • Introduced scripts/prepare-release.cmd to automate the release preparation process using the nbgv tool.

Project Configuration Updates:

  • Updated Dax.Tokenizer.csproj and Dax.Vpax.Obfuscator.CLI.csproj to remove specific version numbers from package references, allowing for automatic updates. [1] [2]
  • Introduced GlobalSuppressions.cs in Dax.Tokenizer to handle code analysis suppressions.
  • Updated version.json files to use the latest schema URL and refined release branch specifications. [1] [2]

Updated nuget.config to include a packageSourceMapping section. This section maps all packages (*) to the nuget.org source, enhancing configuration for managing multiple package sources and ensuring correct package retrieval.
Restructured CI workflow by splitting the original `ci.yml` into multiple YAML files, each targeting different parts of the project. Removed the original `ci.yml` file and created new CI workflow files:

- `ci-obfuscator-cli.yml`: For `src/Dax.Vpax.Obfuscator.CLI`, runs on `ubuntu-latest`.
- `ci-obfuscator-common.yml`: For `src/Dax.Vpax.Obfuscator.Common`, runs on `ubuntu-latest`.
- `ci-obfuscator.yml`: For `src/Dax.Vpax.Obfuscator` and `src/Dax.Tokenizer`, runs on `windows-latest`.

Each workflow specifies the solution file and triggers, ensuring independent testing of specific project parts, enhancing modularity and maintainability.
- Change runner from `ubuntu-latest` to `windows-latest` in `ci-obfuscator-cli.yml` and `ci-obfuscator-common.yml`
- Rename `release-*` files to `publish-*`
- Update environment variables to more descriptive names in `publish-*` files
- Update `dotnet publish`, `dotnet pack`, `dotnet nuget push`, and `gh release create` steps to use new variable names
- Add condition to run `publish` job only if `github.ref` is `refs/heads/main`
- Update `gh release create` command to use `RELEASE_TAG` directly
- Removed <RepositoryBranch>main</RepositoryBranch> line from the project file.
- Added <TargetsForTfmSpecificBuildOutput> property to <PropertyGroup>.
- Removed section including DLLs from project references for net472, net6.0, net8.0.
- Added <None> item to include target path in the ref folder of the package.
- Added new target IncludeProjectReferenceDlls to include project reference DLLs in the build output package.
@albertospelta albertospelta merged commit 392ecf0 into main Dec 19, 2024
3 checks passed
@albertospelta albertospelta deleted the alberto/patch-refactor-repo branch December 19, 2024 12:33
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