This repository contains a GitHub Actions workflow that automatically generates C# code files from an ABI file obtained from an API, using the NethereumGenerator.ExtendedConsole tool.
The workflow is triggered by opening or editing an issue with a specific format (make contractName@version
). It performs the following steps:
- Parse Issue: Extracts the contract name and version from the issue title.
- Fetch ABI: Makes an HTTP request to the API endpoint to get the ABI JSON.
- Save ABI: Writes the ABI JSON to a file with the naming convention
contractName.abi
. - Generate Code: Runs the Nethereum.Generator.Console tool to generate C# code files from the ABI file.
- Create Branch: Creates a new branch with the name
added-contractName
. - Commit and Push: Commits the generated code files and pushes them to the new branch.
- Create Pull Request: Opens a pull request with the generated code files.
- Auto-Merge: Automatically merges the pull request if it meets the specified conditions.
- Close Issue: Closes the original issue that triggered the workflow.
To trigger the workflow, open a new issue in this repository with the title in the format make contractName@version
. The workflow will automatically generate the C# code files and create a pull request.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the file for details.