{"id":28550358,"url":"https://github.com/seek-oss/changesets-snapshot","last_synced_at":"2026-04-02T00:34:02.823Z","repository":{"id":46040951,"uuid":"515033639","full_name":"seek-oss/changesets-snapshot","owner":"seek-oss","description":"A GitHub Action for publishing snapshot releases when using changesets","archived":false,"fork":false,"pushed_at":"2025-08-11T17:42:56.000Z","size":2415,"stargazers_count":20,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-11T19:37:38.083Z","etag":null,"topics":["actions","changesets","github"],"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/seek-oss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-18T04:25:20.000Z","updated_at":"2025-07-28T03:37:03.000Z","dependencies_parsed_at":"2024-02-26T00:24:19.307Z","dependency_job_id":"6e95513d-7ff4-49ec-8595-da756335e83f","html_url":"https://github.com/seek-oss/changesets-snapshot","commit_stats":{"total_commits":66,"total_committers":6,"mean_commits":11.0,"dds":0.5909090909090908,"last_synced_commit":"fa87525fc399e47da489490d5f22387274f9ad00"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/seek-oss/changesets-snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seek-oss%2Fchangesets-snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seek-oss%2Fchangesets-snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seek-oss%2Fchangesets-snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seek-oss%2Fchangesets-snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seek-oss","download_url":"https://codeload.github.com/seek-oss/changesets-snapshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seek-oss%2Fchangesets-snapshot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269947873,"owners_count":24501788,"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-08-11T02:00:10.019Z","response_time":75,"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":["actions","changesets","github"],"created_at":"2025-06-10T03:08:53.654Z","updated_at":"2026-04-02T00:34:02.803Z","avatar_url":"https://github.com/seek-oss.png","language":"TypeScript","readme":"# changesets-snapshot\n\nA GitHub Action for publishing [snapshot releases] when using [changesets].\n\n[snapshot releases]: https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md\n[changesets]: https://github.com/changesets/changesets\n\n## Why\n\nChangesets publish a [GitHub action] which can be used for the regular changesets flow of Version Packages PR and publishing to NPM.\n\nUnfortunately, the Changesets action doesn't support publishing snapshot releases (yet?), so this action exists to fill that requirement.\n\n[github action]: https://github.com/changesets/action\n\n### Tradeoffs\n\nIn order to set up the proper arguments/config for snapshot publishing, this action calls `changeset version` and `changeset publish` internally.\n\nThis means that, unlike the Changesets action, these commands cannot be overridden entirely.\nYou can [provide extra scripts] that you want to run ahead of each of the version and publish commands, but the changeset commands will still run as well.\n\nPractically, this means:\n\n- **This action can only publish NPM packages**. `changeset publish` eventually calls `npm publish`, so a project that isn't published with `npm` won't be able to use this snapshot action.\n- **This action can only publish to the npmjs.com registry**. To ensure auth is set up correctly, this action will overwrite any existing `.npmrc` files. This means that alternate registry information will be lost (e.g. for publishing to GitHub Packages). We're open to this being a feature though, so create an issue if this is a part of the workflow that you need.\n\n[provide extra scripts]: #inputs\n\n## Getting Started\n\nTo publish snapshot releases for your package, you need to create a workflow that uses the `seek-oss/changesets-snapshot` action.\n\nYou probably also want to run this workflow manually, rather than on every push, which means configuring it to respond to the [`workflow_dispatch` event][wde].\n\nIn this particular example, you will need to provide an NPM token and a GitHub token to the `env` of the action.\n\nAn example workflow might look like:\n\n```yaml\nname: Snapshot\n\non: workflow_dispatch\n\njobs:\n  release:\n    name: Publish snapshot version\n    runs-on: ubuntu-latest\n    env:\n      CI: true\n    steps:\n      - name: Check out repo\n        uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Set up Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: 20.x\n\n      - name: Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: Publish\n        uses: seek-oss/changesets-snapshot@v0\n        with:\n          pre-publish: pnpm build\n        env:\n          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n[wde]: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow\n\n## Trusted publishing\n\nTo configure a npm token-less workflow, you can enable [Trusted publishing](https://docs.npmjs.com/trusted-publishers) on your npm package.\nSince this requires specifying a single workflow file, you'll need to create a shared release workflow that uses alternate triggers and conditions.\n\nAn example workflow might look like:\n\n```yaml\nname: Release\n\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\n\njobs:\n  release:\n    name: Publish latest version\n    if: github.event_name == 'push'\n    runs-on: ubuntu-latest\n    env:\n      CI: true\n    steps:\n      - name: Check out repo\n        uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Set up Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: 20.x\n\n      - name: Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      # npm 11.5.1 or later is required\n      - name: Install latest npm\n        run: npm install -g npm@latest\n\n      - name: Publish to npm\n        uses: changesets/action@v1\n        with:\n          publish: pnpm release\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  snapshot:\n    name: Publish snapshot version\n    if: github.event_name == 'workflow_dispatch'\n    runs-on: ubuntu-latest\n    env:\n      CI: true\n    steps:\n      - name: Check out repo\n        uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Set up Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: 20.x\n\n      - name: Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      # npm 11.5.1 or later is required\n      - name: Install latest npm\n        run: npm install -g npm@latest\n\n      - name: Publish\n        uses: seek-oss/changesets-snapshot@v0\n        with:\n          pre-publish: pnpm build\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Advanced triggers\n\nGithub actions have many options for deciding whether a workflow should be run.\n\nOne example of an alternative flow to the manual run is to run the snapshot release when someone comments a specific phrase on a PR.\n[Polaris] has an [implementation] of this for inspiration, which runs when an authorised user comments `/snapit` on a PR.\n\n[polaris]: https://github.com/Shopify/polaris\n[implementation]: https://github.com/Shopify/polaris/blob/8296f4304fdb72dedd17d45bc7db154bf41cc3c4/.github/workflows/snapit.yml#L13-L15\n\n## API\n\n### Inputs\n\nWhen running the regular changesets action, you can [provide your own scripts][scripts] for `version` and `publish`, which allows you to use custom publishing behaviours instead of the changesets builtin.\n\nThis is useful if you are:\n\n- not publishing to the npmjs.com registry or releasing an NPM packge, hence requiring some other publish process\n- or, if there are other processes you need to run in conjunction with versioning/publishing.\n\nThis action only publishes NPM packages to the npmjs.com registry, but the second point is addressed through the `pre-` inputs.\n\n#### `pre-version`\n\nYou can provide a script here that will run before the `changeset version` command, in case you have any custom versioning requirements that wouldn't be handled by the inbuilt changeset version command.\n\n#### `pre-publish`\n\nPerhaps more common, the `pre-publish` input can be used for processes you want to run before (and only before) the `changeset publish` occurs.\n\nFor example, you might want to use this step to run a build before the publish step runs.\n\n[scripts]: https://github.com/changesets/action#inputs\n\n### Outputs\n\nThe action reports on the outcome of publishing primarily with a notice in the [step summary], but also as action outputs.\n\nThe action outputs are listed in the [action.yml] file.\n\n[step summary]: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/\n[action.yml]: ./action.yml\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseek-oss%2Fchangesets-snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseek-oss%2Fchangesets-snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseek-oss%2Fchangesets-snapshot/lists"}