{"id":29880297,"url":"https://github.com/solana-developers/squads-program-action","last_synced_at":"2025-07-31T09:40:53.919Z","repository":{"id":275012119,"uuid":"924760178","full_name":"solana-developers/squads-program-action","owner":"solana-developers","description":"An action to trigger a squads upgrade including program buffer, idl buffer and verify PDA.","archived":false,"fork":false,"pushed_at":"2025-02-05T13:19:05.000Z","size":2246,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T14:26:15.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-30T15:55:12.000Z","updated_at":"2025-02-05T13:19:02.000Z","dependencies_parsed_at":"2025-02-05T14:26:24.820Z","dependency_job_id":null,"html_url":"https://github.com/solana-developers/squads-program-action","commit_stats":null,"previous_names":["woody4618/squads-program-action","solana-developers/squads-program-action"],"tags_count":0,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/solana-developers/squads-program-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fsquads-program-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fsquads-program-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fsquads-program-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fsquads-program-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solana-developers","download_url":"https://codeload.github.com/solana-developers/squads-program-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-developers%2Fsquads-program-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268017357,"owners_count":24181669,"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-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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-07-31T09:40:51.619Z","updated_at":"2025-07-31T09:40:53.892Z","avatar_url":"https://github.com/solana-developers.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Squads Program Action\n\nA GitHub Action to automate Solana program upgrades through Squads multisig.\nThis action creates and submits a multisig transaction that includes program\nupgrade, optional IDL update, and optional PDA verification.\n\nThe easiest way to use this squads action is to use the\n[reusable workflow](https://github.com/solana-developers/github-workflows) which\nwill automatically handle the build, upload, and verify steps.\n\n## Features\n\n- Creates a Squads multisig transaction containing:\n  - Program upgrade instruction using a new buffer\n  - IDL upgrade instruction using a new IDL buffer\n  - Optional PDA verification instruction\n- Handles automatic retries for RPC connections\n- Supports custom RPC endpoints\n- Works with any Squads v4 multisig\n\n## Usage\n\n```yaml\n- uses: Woody4618/squads-program-action@v0.3.0\n  with:\n    # Required: RPC URL for Solana\n    rpc: ${{ secrets.RPC_URL }}\n\n    # Required: Program ID to upgrade\n    program: BhV84MZrRnEvtWLdWMRJGJr1GbusxfVMHAwc3pq92g4z\n\n    # Required: Buffer containing the new program\n    buffer: 7SGJSG8aoZj39NeAkZvbUvsPDMRcUUrhRhPzgzKv7743\n\n    # Optional: Buffer containing the new IDL\n    idl-buffer: E74BKk75nHtSScZJ4YZ5gB2orvhdzLjcFyxyqkNx6MNc\n\n    # Required: Squads multisig address\n    multisig: ${{ secrets.MULTISIG }}\n\n    # Required: Byte array of the keypair. Needs to have at least voter permission in squads. Format: [23,42,53...]\n    keypair: ${{ secrets.KEYPAIR }}\n\n    # Optional: Priority fee in lamports for the transaction (default: 100000)\n    priority-fee: 100000\n\n    # Optional: Index of the Squads vault to use (default: 0)\n    vault-index: 0\n\n    # Optional: Base64 encoded PDA verification transaction. Get this from solana verify cli using solana-verify export-pda-tx\n    pda-tx: ${{ secrets.PDA_TX }}\n```\n\n## Prerequisites\n\nBefore using this action, you need:\n\n1. A Squads v4 multisig with:\n   - Program upgrade authority\n   - Required members set up\n2. Program buffer uploaded to Solana\n3. IDL buffer uploaded to Solana\n4. Keypair with permission to create transactions in the multisig\n\n## Example Workflow\n\n```yaml\nname: Upgrade Program\non:\n  workflow_dispatch:\n    inputs:\n      buffer:\n        description: 'Program buffer address'\n        required: true\n      idl-buffer:\n        description: 'IDL buffer address'\n        required: true\n\njobs:\n  upgrade:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: Woody4618/squads-program-action@main\n        with:\n          rpc: ${{ secrets.RPC_URL }}\n          program: BhV84MZrRnEvtWLdWMRJGJr1GbusxfVMHAwc3pq92g4z\n          buffer: ${{ inputs.buffer }}\n          idl-buffer: ${{ inputs.idl-buffer }}\n          multisig: ${{ secrets.MULTISIG }}\n          keypair: ${{ secrets.KEYPAIR }}\n          # Optional: Increase priority fee for faster processing\n          priority-fee: 200000\n          # Optional: Use a different vault index\n          vault-index: 0\n```\n\n## What Happens After Running\n\n1. The action creates a transaction in your Squads multisig containing:\n   - Program upgrade instruction\n   - IDL upgrade instruction\n   - PDA verification (if provided)\n2. Visit [Squads UI](https://v4.squads.so/) to:\n   - Review the transaction\n   - Approve with required signatures\n3. Once enough members approve, Squads executes:\n   - Program upgrade\n   - IDL update (if included)\n   - PDA verification (if included)\n\n## Security Notes\n\n- The provided keypair only needs permission to create transactions\n- Actual upgrade authority comes from the Squads vault\n- Keep your keypair and multisig address secure in GitHub Secrets\n- Use a reliable RPC endpoint as the action includes retry logic\n\n## Development Guide\n\nTo contribute or modify this action:\n\n1. Clone the repository\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Make your changes\n4. Build the action:\n\n```bash\nnpm run bundle\n```\n\n5. Test locally:\n\n```bash\nnpm run local-action\n```\n\n## Create a GitHub Action Using TypeScript\n\n[![GitHub Super-Linter](https://github.com/actions/typescript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/actions/typescript-action/actions/workflows/ci.yml/badge.svg)\n[![Check dist/](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml)\n[![CodeQL](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml)\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n\nUse this template to bootstrap the creation of a TypeScript action. :rocket:\n\nThis template includes compilation support, tests, a validation workflow,\npublishing, and versioning guidance.\n\nIf you are new, there's also a simpler introduction in the\n[Hello world JavaScript action repository](https://github.com/actions/hello-world-javascript-action).\n\n## Create Your Own Action\n\nTo create your own action, you can use this repository as a template! Just\nfollow the below instructions:\n\n1. Click the **Use this template** button at the top of the repository\n1. Select **Create a new repository**\n1. Select an owner and name for your new repository\n1. Click **Create repository**\n1. Clone your new repository\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Make sure to remove or update the [`CODEOWNERS`](./CODEOWNERS) file! For\n\u003e details on how to use this file, see\n\u003e [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).\n\n## Initial Setup\n\nAfter you've cloned the repository to your local machine or codespace, you'll\nneed to perform some initial setup steps before you can develop your action.\n\n\u003e [!NOTE]\n\u003e\n\u003e You'll need to have a reasonably modern version of\n\u003e [Node.js](https://nodejs.org) handy (20.x or later should work!). If you are\n\u003e using a version manager like [`nodenv`](https://github.com/nodenv/nodenv) or\n\u003e [`fnm`](https://github.com/Schniz/fnm), this template has a `.node-version`\n\u003e file at the root of the repository that can be used to automatically switch to\n\u003e the correct version when you `cd` into the repository. Additionally, this\n\u003e `.node-version` file is used by GitHub Actions in any `actions/setup-node`\n\u003e actions.\n\n1. :hammer_and_wrench: Install the dependencies\n\n   ```bash\n   npm install\n   ```\n\n1. :building_construction: Package the TypeScript for distribution\n\n   ```bash\n   npm run bundle\n   ```\n\n1. :white_check_mark: Run the tests\n\n   ```bash\n   $ npm test\n\n   PASS  ./index.test.js\n     ✓ throws invalid number (3ms)\n     ✓ wait 500 ms (504ms)\n     ✓ test runs (95ms)\n\n   ...\n   ```\n\n## Update the Action Metadata\n\nThe [`action.yml`](action.yml) file defines metadata about your action, such as\ninput(s) and output(s). For details about this file, see\n[Metadata syntax for GitHub Actions](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions).\n\nWhen you copy this repository, update `action.yml` with the name, description,\ninputs, and outputs for your action.\n\n## Update the Action Code\n\nThe [`src/`](./src/) directory is the heart of your action! This contains the\nsource code that will be run when your action is invoked. You can replace the\ncontents of this directory with your own code.\n\nThere are a few things to keep in mind when writing your action code:\n\n- Most GitHub Actions toolkit and CI/CD operations are processed asynchronously.\n  In `main.ts`, you will see that the action is run in an `async` function.\n\n  ```javascript\n  import * as core from '@actions/core'\n  //...\n\n  async function run() {\n    try {\n      //...\n    } catch (error) {\n      core.setFailed(error.message)\n    }\n  }\n  ```\n\n  For more information about the GitHub Actions toolkit, see the\n  [documentation](https://github.com/actions/toolkit/blob/master/README.md).\n\nSo, what are you waiting for? Go ahead and start customizing your action!\n\n1. Create a new branch\n\n   ```bash\n   git checkout -b releases/v1\n   ```\n\n1. Replace the contents of `src/` with your action code\n1. Add tests to `__tests__/` for your source code\n1. Format, test, and build the action\n\n   ```bash\n   npm run all\n   ```\n\n   \u003e This step is important! It will run [`rollup`](https://rollupjs.org/) to\n   \u003e build the final JavaScript action code with all dependencies included. If\n   \u003e you do not run this step, your action will not work correctly when it is\n   \u003e used in a workflow.\n\n1. (Optional) Test your action locally\n\n   The [`@github/local-action`](https://github.com/github/local-action) utility\n   can be used to test your action locally. It is a simple command-line tool\n   that \"stubs\" (or simulates) the GitHub Actions Toolkit. This way, you can run\n   your TypeScript action locally without having to commit and push your changes\n   to a repository.\n\n   The `local-action` utility can be run in the following ways:\n\n   - Visual Studio Code Debugger\n\n     Make sure to review and, if needed, update\n     [`.vscode/launch.json`](./.vscode/launch.json)\n\n   - Terminal/Command Prompt\n\n     ```bash\n     # npx local action \u003caction-yaml-path\u003e \u003centrypoint\u003e \u003cdotenv-file\u003e\n     npx local-action . src/main.ts .env\n     ```\n\n   You can provide a `.env` file to the `local-action` CLI to set environment\n   variables used by the GitHub Actions Toolkit. For example, setting inputs and\n   event payload data used by your action. For more information, see the example\n   file, [`.env.example`](./.env.example), and the\n   [GitHub Actions Documentation](https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables).\n\n1. Commit your changes\n\n   ```bash\n   git add .\n   git commit -m \"My first action is ready!\"\n   ```\n\n1. Push them to your repository\n\n   ```bash\n   git push -u origin releases/v1\n   ```\n\n1. Create a pull request and get feedback on your action\n1. Merge the pull request into the `main` branch\n\nYour action is now published! :rocket:\n\nFor information about versioning your action, see\n[Versioning](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\nin the GitHub Actions toolkit.\n\n## Local Development\n\nAfter testing, you can create version tag(s) that developers can use to\nreference different stable versions of your action.\n\nTo include the action in a workflow in another repository, you can use the\n`uses` syntax with the `@` symbol to reference a specific branch, tag, or commit\nhash.\n\n```yaml\nsteps:\n  - name: Checkout\n    id: checkout\n    uses: actions/checkout@v4\n\n  - name: Test Local Action\n    id: test-action\n    uses: actions/typescript-action@v1 # Commit with the `v1` tag\n    with:\n      milliseconds: 1000\n\n  - name: Print Output\n    id: output\n    run: echo \"${{ steps.test-action.outputs.time }}\"\n```\n\n## Publishing a New Release\n\nThis project includes a helper script, [`script/release`](./script/release)\ndesigned to streamline the process of tagging and pushing new releases for\nGitHub Actions.\n\nGitHub Actions allows users to select a specific version of the action to use,\nbased on release tags. This script simplifies this process by performing the\nfollowing steps:\n\n1. **Retrieving the latest release tag:** The script starts by fetching the most\n   recent SemVer release tag of the current branch, by looking at the local data\n   available in your repository.\n1. **Prompting for a new release tag:** The user is then prompted to enter a new\n   release tag. To assist with this, the script displays the tag retrieved in\n   the previous step, and validates the format of the inputted tag (vX.X.X). The\n   user is also reminded to update the version field in package.json.\n1. **Tagging the new release:** The script then tags a new release and syncs the\n   separate major tag (e.g. v1, v2) with the new release tag (e.g. v1.0.0,\n   v2.1.2). When the user is creating a new major release, the script\n   auto-detects this and creates a `releases/v#` branch for the previous major\n   version.\n1. **Pushing changes to remote:** Finally, the script pushes the necessary\n   commits, tags and branches to the remote repository. From here, you will need\n   to create a new release in GitHub so users can easily reference the new tags\n   in their workflows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-developers%2Fsquads-program-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolana-developers%2Fsquads-program-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-developers%2Fsquads-program-action/lists"}