{"id":42200048,"url":"https://github.com/joshjohanning/publish-github-action","last_synced_at":"2026-05-27T04:09:56.945Z","repository":{"id":221622988,"uuid":"726930234","full_name":"joshjohanning/publish-github-action","owner":"joshjohanning","description":"📢 Publish your JavaScript/TypeScript-based GitHub Actions","archived":false,"fork":false,"pushed_at":"2026-04-15T21:24:41.000Z","size":7138,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-15T21:26:26.110Z","etag":null,"topics":["actions","github","javascript","node-action"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"tgymnich/publish-github-action","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshjohanning.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-03T20:11:35.000Z","updated_at":"2026-04-15T21:09:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/joshjohanning/publish-github-action","commit_stats":null,"previous_names":["joshjohanning/publish-github-action"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/joshjohanning/publish-github-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjohanning%2Fpublish-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjohanning%2Fpublish-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjohanning%2Fpublish-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjohanning%2Fpublish-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshjohanning","download_url":"https://codeload.github.com/joshjohanning/publish-github-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjohanning%2Fpublish-github-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["actions","github","javascript","node-action"],"created_at":"2026-01-27T00:23:53.519Z","updated_at":"2026-05-27T04:09:56.939Z","avatar_url":"https://github.com/joshjohanning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Publish GitHub Action\n\n[![GitHub release](https://img.shields.io/github/release/joshjohanning/publish-github-action.svg?labelColor=333)](https://github.com/joshjohanning/publish-github-action/releases)\n[![Immutable Releases](https://img.shields.io/badge/releases-immutable-blue?labelColor=333)](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases)\n[![GitHub marketplace](https://img.shields.io/badge/marketplace-publish--github--action--with--ncc-blue?logo=github\u0026labelColor=333)](https://github.com/marketplace/actions/publish-github-action-with-ncc)\n[![CI](https://github.com/joshjohanning/publish-github-action/actions/workflows/ci.yml/badge.svg)](https://github.com/joshjohanning/publish-github-action/actions/workflows/ci.yml)\n[![Publish GitHub Action](https://github.com/joshjohanning/publish-github-action/actions/workflows/publish.yml/badge.svg?branch=main\u0026event=push)](https://github.com/joshjohanning/publish-github-action/actions/workflows/publish.yml)\n![Coverage](./badges/coverage.svg)\n\nThis action creates a release branch for your GitHub Actions which will be automatically tagged and released. The release version can be defined in `package.json`.\n\nBased on the [tgymnich/publish-github-action](https://github.com/tgymnich/publish-github-action) action, but I wanted further customization and control over the release process (i.e.: adding `ncc` output and not committing `node_modules` directory).\n\n## What's new\n\nPlease refer to the [release page](https://github.com/joshjohanning/publish-github-action/releases) for the latest release notes.\n\n## Features\n\n- 🔐 **Verified Commits** - Uses GitHub API to create verified commits (when `commit_node_modules` is `false`)\n- 🏷️ **Annotated Tags** - Creates annotated tags via Git CLI with atomic updates (no downtime)\n- 🌐 **Multi-instance Support** - API URL defaults to the environment you are running in; works with GitHub.com, GitHub Enterprise Server, and GHE.com\n- 📦 **Flexible Build** - Automatically installs production dependencies and supports custom build commands\n- 🗂️ **Selective Commits** - Choose which files to include (dist, node_modules, or both)\n\n## Inputs\n\n| Input                       | Description                                                                                                                                                                                                                                                                                                            | Required | Default                 |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------- |\n| `github_token`              | Token for the GitHub API                                                                                                                                                                                                                                                                                               | Yes      | -                       |\n| `github_api_url`            | GitHub API URL (e.g., `https://api.github.com` for GitHub.com or `https://ghes.domain.com/api/v3` for GHES)                                                                                                                                                                                                            | No       | `${{ github.api_url }}` |\n| `npm_package_command`       | Command to build the action                                                                                                                                                                                                                                                                                            | No       | `npm run package`       |\n| `commit_node_modules`       | Whether to commit `node_modules` folder. **Note:** When set to `true`, commits will NOT be verified due to API limitations with large file counts                                                                                                                                                                      | No       | `false`                 |\n| `commit_dist_folder`        | Whether to commit `dist` folder                                                                                                                                                                                                                                                                                        | No       | `true`                  |\n| `publish_minor_version`     | Whether to publish minor version tag (e.g., `v1.2`)                                                                                                                                                                                                                                                                    | No       | `false`                 |\n| `publish_release_branch`    | Whether to publish release branch (e.g., `releases/v1.2.3`)                                                                                                                                                                                                                                                            | No       | `false`                 |\n| `create_release_as_draft`   | Whether to create release as draft to allow review of the release before publishing; useful with [immutable releases](https://docs.github.com/en/actions/how-tos/create-and-publish-actions/using-immutable-releases-and-tags-to-manage-your-actions-releases) where changes cannot be made after publishing           | No       | `false`                 |\n| `draft_release_pr_reminder` | Post a reminder comment on the merged PR when creating a draft release                                                                                                                                                                                                                                                 | No       | `false`                 |\n| `comment_on_linked_issues`  | Comment on closed issues linked to PRs in the release notes to notify followers of the release (uses GraphQL `closingIssuesReferences`; idempotent — updates existing comment on rerun). Comments are posted for both published and draft releases; the comment is updated if the version changes on a subsequent run. | No       | `false`                 |\n\n### Commit Signing Behavior\n\n- ✅ **Verified commits** (signed by GitHub) when `commit_node_modules: false` - Uses GitHub API for commits; tags are created locally via Git CLI\n- ❌ **Unverified commits** when `commit_node_modules: true` - Uses Git CLI due to API limitations with large file counts\n\n### Build and File Management\n\nThe action automatically handles clean builds and file management:\n\n- **Dist folder cleaning**: When `commit_dist_folder: true` and `npm_package_command` is specified, the `dist/` folder is cleaned before building to ensure no stale files persist\n- **Automatic file deletion**: The action removes `.github/` files from release commits and properly handles renamed/deleted files in the `dist/` folder\n\n## Permissions\n\nThe action requires specific permissions depending on features used:\n\n| Permission             | Required | Purpose                                                                |\n| ---------------------- | -------- | ---------------------------------------------------------------------- |\n| `contents: write`      | Yes      | Push tags and create releases                                          |\n| `pull-requests: write` | No       | Post reminder comment on merged PR (`draft_release_pr_reminder: true`) |\n| `issues: write`        | No       | Comment on linked issues (`comment_on_linked_issues: true`)            |\n\nExample with all permissions:\n\n```yml\npermissions:\n  contents: write\n  pull-requests: write # only needed if using draft_release_pr_reminder\n  issues: write # only needed if using comment_on_linked_issues\n```\n\n## Example Workflow\n\n\u003e [!NOTE]\n\u003e The `install ncc` step is only needed if `@vercel/ncc` is not in your `package.json` devDependencies. If you already have it as a dev dependency, you can skip this step.\n\n```yml\nname: 'Publish GitHub Action'\non:\n  push:\n    branches:\n      - main\n\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n      - name: install ncc\n        run: npm i -g @vercel/ncc\n      - uses: joshjohanning/publish-github-action@v3\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          npm_package_command: npm run package\n          commit_node_modules: false\n          commit_dist_folder: true\n          publish_minor_version: false\n          publish_release_branch: false\n          create_release_as_draft: false\n          draft_release_pr_reminder: true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshjohanning%2Fpublish-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshjohanning%2Fpublish-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshjohanning%2Fpublish-github-action/lists"}