{"id":19232373,"url":"https://github.com/dprint/automation","last_synced_at":"2025-04-11T02:07:22.037Z","repository":{"id":41427587,"uuid":"473387003","full_name":"dprint/automation","owner":"dprint","description":"Common scripts used across repos.","archived":false,"fork":false,"pushed_at":"2024-12-01T23:47:40.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T02:07:14.180Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dprint.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.ts","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-03-23T23:09:05.000Z","updated_at":"2024-12-01T23:47:25.000Z","dependencies_parsed_at":"2023-11-19T18:25:08.090Z","dependency_job_id":"af715f74-963e-4f2e-b608-6d8a41f922b2","html_url":"https://github.com/dprint/automation","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dprint%2Fautomation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dprint%2Fautomation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dprint%2Fautomation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dprint%2Fautomation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dprint","download_url":"https://codeload.github.com/dprint/automation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328166,"owners_count":21085261,"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","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":"2024-11-09T16:06:06.207Z","updated_at":"2025-04-11T02:07:22.008Z","avatar_url":"https://github.com/dprint.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dprint_automation\n\nCommon scripts used across repos.\n\n## Creating a Process Plugin File\n\n```ts\n// create_process_plugin.ts\nimport {\n  extractCargoVersion,\n  processPlugin,\n  // replace X.X.X with the latest tag in this repo\n} from \"https://raw.githubusercontent.com/dprint/automation/X.X.X/mod.ts\";\nimport * as path from \"https://deno.land/std@0.130.0/path/mod.ts\";\n\nconst pluginName = \"your-plugin-name\";\n\nconst currentDirPath = path.dirname(path.fromFileUrl(import.meta.url));\n// only if using cargo... otherwise find another way to get the version\nconst cargoFilePath = path.join(currentDirPath, \"../\", \"Cargo.toml\");\n\nconst builder = new PluginFileBuilder({\n  name: pluginName,\n  version: await extractCargoVersion(cargoFilePath),\n});\n\n// then for each platform do something like:\nconst zipFileName = processPlugin.getStandardZipFileName(pluginName, \"windows-x86_64\");\nawait builder.addPlatform({\n  platform: \"windows-x86_64,\n  zipFilePath: `path/to/${zipFileName}`,\n  zipUrl: `https://github.com/your-org-or-user/${pluginName}/releases/download/${builder.version}/${zipFileName}`,\n});\n\n// write it to a file\nawait builder.writeToPath(\"plugin.json\");\n```\n\n1. Build each plugin for each platform.\n2. Zip the binaries into zip files.\n3. Run this script:\n   ```shell\n   deno run --allow-read=. --allow-write=. create_process_plugin.ts\n   ```\n4. Upload the `plugin.json` file and all the zip files to the GitHub release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdprint%2Fautomation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdprint%2Fautomation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdprint%2Fautomation/lists"}