automate contract build process #41
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates a GitHub workflow that will automatically run forge build on any new tag (or on demand with a tag parameter). It will then either 1) add the built artifacts to an existing release for that tag or 2) create a new release with the artifacts if one doesn't exist.
I think this will cut down on all the local build/deploy workflows and help us centralize this a bit more.
Note
Adds a workflow that builds Foundry contracts on tag or manual run, extracts ABIs/bytecode, and uploads them to the tag’s GitHub release (creating it if needed).
/.github/workflows/release-artifacts.yml:workflow_dispatchwithtaginput.forge build.gh, creates release if missing, or updates existing one.artifacts/**to the release (clobber enabled) and prints an upload summary.scripts/extract-artifacts.js:out/{Contract}.sol/{Contract}.jsonfor specified contracts.ABI,bytecode, anddeployed bytecodetoartifacts/{Contract}/.GITHUB_OUTPUT.Written by Cursor Bugbot for commit f89b4a5. This will update automatically on new commits. Configure here.