{"id":26666364,"url":"https://github.com/solana-developers/github-actions","last_synced_at":"2025-07-22T09:10:12.718Z","repository":{"id":274952457,"uuid":"924189680","full_name":"solana-developers/github-actions","owner":"solana-developers","description":"A collection of github actions to build, idl upload and verify programs. With Squads support","archived":false,"fork":false,"pushed_at":"2025-05-02T14:08:28.000Z","size":305,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T14:06:58.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solana-developers.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-29T15:19:53.000Z","updated_at":"2025-05-02T14:07:52.000Z","dependencies_parsed_at":"2025-04-08T01:21:27.575Z","dependency_job_id":"a1ba232c-4c90-4662-9df8-c51ae0b16775","html_url":"https://github.com/solana-developers/github-actions","commit_stats":null,"previous_names":["woody4618/github-action","woody4618/solana-github-action-workflow","woody4618/github-actions","solana-developers/github-actions"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/solana-developers/github-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fgithub-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fgithub-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fgithub-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fgithub-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solana-developers","download_url":"https://codeload.github.com/solana-developers/github-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fgithub-actions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266463545,"owners_count":23932902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T18:23:18.971Z","updated_at":"2025-07-22T09:10:12.659Z","avatar_url":"https://github.com/solana-developers.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GitHub Actions Usage\n\nThis repository provides GitHub Actions for managing Solana program deployments and verification.\nIt is highly recommended to use the squads integration for program deployments.\n\n### Features\n\n- ✅ Automated program builds\n- ✅ Program verification against source code\n- ✅ IDL buffer creation and uploads\n- ✅ Squads multisig integration\n- ✅ Program deploys for both devnet and mainnet\n- ✅ Compute budget optimization\n- ✅ Retry mechanisms for RPC failures\n\n### How to use\n\nThe easiest way to use the github actions is using one of the [reusable workflows](https://github.com/solana-developers/github-workflows).\nYou can also follow this [Video Walkthrough](https://youtu.be/h-ngRgWW_IM)\n\nThere are three examples:\n\n- [Anchor Program](https://github.com/Woody4618/anchor-github-action-example)\n- [Native Program](https://github.com/Woody4618/native-solana-github-action-example)\n- [Anchor Program using Squads](https://github.com/Woody4618/workflow-tutorial) \n\n### Required Secrets for specific actions\n\nSome of the actions of the build workflow require you to add secrets to your repository:\n\n```bash\n# Network RPC URLs\nDEVNET_SOLANA_DEPLOY_URL=   # Your devnet RPC URL - Recommended to use a payed RPC url\nMAINNET_SOLANA_DEPLOY_URL=  # Your mainnet RPC URL - Recommended to use a payed RPC url\n\n# Deployment Keys\nDEVNET_DEPLOYER_KEYPAIR=    # Base58 encoded keypair for devnet\nMAINNET_DEPLOYER_KEYPAIR=   # Base58 encoded keypair for mainnet\n\nPROGRAM_ADDRESS_KEYPAIR=    # Keypair of the program address - Needed for initial deploy and for native programs to find the program address. Can also be overwritten in the workflow if you dont have the keypair.\n\n# For Squads integration\nMAINNET_MULTISIG=          # Mainnet Squads multisig address\nMAINNET_MULTISIG_VAULT=    # Mainnet Squads vault address\n```\n\nCustomize the workflow to your needs!\n\n## Key Actions\n\n### Setup \u0026 Configuration\n\n- `setup-all`: Comprehensive development environment setup\n\n  - Installs and configures Solana CLI tools\n  - Sets up Anchor framework (if needed)\n  - Installs solana-verify for build verification\n  - Configures Node.js environment\n  - Handles caching for faster subsequent runs\n  - Inputs:\n    - `solana_version`: Solana version to install\n    - `anchor_version`: Anchor version to install\n    - `verify_version`: solana-verify version to install\n    - `node_version`: Node.js version to install\n\n- `extract-versions`: Automatically detects required versions\n  - Extracts Solana version from Cargo.lock\n  - Detects Anchor version from Anchor.toml or Cargo.lock\n  - Provides fallback versions if not found\n  - Outputs:\n    - `solana_version`: Detected Solana version\n    - `anchor_version`: Detected Anchor version\n\n### Build \u0026 Verification\n\n- `build-verified`: Builds program with verification support\n  - Uses solana-verify for reproducible builds\n  - Supports both native and Anchor programs\n  - Handles feature flags and conditional compilation\n  - Inputs:\n    - `program`: Program name to build\n    - `features`: Optional Cargo features to enable\n\n### Deployment\n\n- `write-program-buffer`: Writes a buffer that will then later be set either from the provided keypair or from the squads multisig\n\n  - Creates buffer for program deployment\n  - Set the buffer authority either to the provided keypair or to the squads multisig\n  - Supports priority fees for faster transactions\n  - Inputs:\n    - `program-id`: Target program ID\n    - `program`: Program name\n    - `rpc-url`: Solana RPC endpoint\n    - `keypair`: Deployer keypair\n    - `buffer-authority-address`: Authority for the buffer\n    - `priority-fee`: Transaction priority fee\n\n- `write-idl-buffer`: Writes an Anchor IDL buffer that will then later be set either from the provided keypair or from the squads multisig\n  - Creates IDL buffer\n  - Sets up IDL authority\n  - Prepares for IDL updates\n  - Inputs:\n    - `program-id`: Program ID\n    - `program`: Program name\n    - `rpc-url`: Solana RPC endpoint\n    - `keypair`: Deployer keypair\n    - `idl-authority`: Authority for IDL updates\n\n### Additional Actions\n\n- `build-anchor`: Specialized Anchor program builder\n- `program-upgrade`: Handles the exteding of the program account in case the program is getting bigger and either sets the buffer or skips that in case of squads deploy\n- `idl-upload`: Either sets the IDL buffer or skips that in case of squads deploy\n- `verify-build`: Verifies on-chain programs match source using solana-verify andthe osec api\n\n## 📝 Todo List\n\n### Program Verification\n\n- [x] Trigger verified build PDA upload\n- [x] Verify build remote trigger\n- [x] Support and test squads Verify\n- [x] Support and test squads IDL\n- [x] Support and test squads Program deploy\n\n### Action Improvements\n\n- [x] Separate IDL and Program buffer action\n- [x] Remove deprecated cache functions\n- [x] Remove node-version from anchor build\n- [x] Skip anchor build when native program build\n- [ ] Make verify build and anchor build in parallel\n- [x] Trigger release build on tag push\n- [x] Trigger devnet releases on develop branch?\n- [x] Make solana verify also work locally using cat\n- [x] Use keypairs to find deployer address to remove 2 secrets\n- [x] Add priority fees\n- [x] Add extend program if needed\n- [x] Bundle the needed TS scripts with the .github actions for easier copy paste\n\n### Testing \u0026 Integration\n\n- [x] Add running tests\n  - Research support for different test frameworks\n- [ ] Add Codama support\n- [ ] Add to solana helpers or mucho -\u003e release\n- [ ] Write guide and record video\n\n# Close Buffer in case of failure\n\nThere may the occasions where the release flow fails in between writing the program buffer and the program deploy in squads.\nIn that case you may want to close a buffer that was already transferred authority to your multisig.\nYou can do that using the following command:\n\n```bash\nsolana program show --buffers --buffer-authority \u003cYou multisig vault address\u003e\n\nnpx ts-node scripts/squad-closebuffer.ts \\\n --rpc \"https://api.mainnet-beta.solana.com\" \\\n --multisig \"FJviNjW3L2u2kR4TPxzUNpfe2ZjrULCRhQwWEu3LGzny\" \\\n --buffer \"7SGJSG8aoZj39NeAkZvbUvsPDMRcUUrhRhPzgzKv7743\" \\\n --keypair ~/.config/solana/id.json \\\n --program \"BhV84MZrRnEvtWLdWMRJGJr1GbusxfVMHAwc3pq92g4z\"\n```\n\n# Release v0.2.3\n\n## Bug Fixes\n\n- Fix extend program size check\n\n# Release v0.2.2\n\n## Bug Fixes\n\n- Remove compute unit price from program extend\n\n# Release v0.2.1\n\n## Bug Fixes\n\n- Fixed program size extraction in buffer write action\n\n# Release v0.2.0\n\n## Major Changes\n\n- Combined setup actions into a single `setup-all` action\n- Improved version management with override capabilities\n- Added support for feature flags in builds and tests\n- Enhanced caching strategy for faster builds\n\n## New Features\n\n- Added version override inputs:\n  - `override-solana-version`\n  - `override-anchor-version`\n- Added feature flags support for tests\n- Added toml-cli caching\n- Improved error handling in buffer management\n\n## Breaking Changes\n\n- Removed individual setup actions in favor of `setup-all`\n- Changed input parameter naming convention (using underscores instead of hyphens)\n- Simplified build-verified action inputs\n\n## Bug Fixes\n\n- Fixed version extraction logic\n- Fixed cache key generation\n- Fixed buffer authority handling\n\n## Documentation\n\n- Updated README with detailed action descriptions\n- Added comprehensive input/output documentation\n- Added buffer cleanup instructions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-developers%2Fgithub-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolana-developers%2Fgithub-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-developers%2Fgithub-actions/lists"}