{"id":18401973,"url":"https://github.com/vimtor/action-update-version","last_synced_at":"2025-04-07T07:31:57.105Z","repository":{"id":48293948,"uuid":"292085447","full_name":"vimtor/action-update-version","owner":"vimtor","description":"🏷 Update your files version field on new releases","archived":false,"fork":false,"pushed_at":"2022-03-07T13:58:39.000Z","size":454,"stargazers_count":16,"open_issues_count":20,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-02T06:02:03.118Z","etag":null,"topics":["actions","package-json","release","version-control-system","versioning"],"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/vimtor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["pocket-apps"]}},"created_at":"2020-09-01T19:10:55.000Z","updated_at":"2024-06-08T23:36:37.000Z","dependencies_parsed_at":"2023-01-11T17:23:04.815Z","dependency_job_id":null,"html_url":"https://github.com/vimtor/action-update-version","commit_stats":{"total_commits":27,"total_committers":4,"mean_commits":6.75,"dds":"0.40740740740740744","last_synced_commit":"4568aca7180ed7976b4ad2e8c5ffe099a25cd281"},"previous_names":["pocket-apps/action-update-version"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimtor%2Faction-update-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimtor%2Faction-update-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimtor%2Faction-update-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimtor%2Faction-update-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimtor","download_url":"https://codeload.github.com/vimtor/action-update-version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247612230,"owners_count":20966696,"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":["actions","package-json","release","version-control-system","versioning"],"created_at":"2024-11-06T02:40:41.536Z","updated_at":"2025-04-07T07:31:56.797Z","avatar_url":"https://github.com/vimtor.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n   \u003ch1\u003e🏷 update-version\u003c/h1\u003e\n   \u003cp\u003eUpdate your files version field on new releases\u003c/p\u003e\n   \u003cp align=\"center\"\u003e\n    \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/workflow/status/pocket-apps/action-update-version/CI\"\u003e\n    \u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/pocket-apps/action-update-version\"\u003e\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/pocket-apps/action-update-version\"\u003e\n   \u003c/p\u003e\n\u003c/div\u003e\n\n## 🧠 Why\n\n- Most actions related to version upgrade do it backwards:\nwhen you push a commit with version change in a specific branch a release is created.\n\n- This action does the opposite: when you create a release the\nspecified files will get updated with the new version, so you don't forget to update them.\n\nThis comes in handy when working with git workflows such as [trunk-base-development](https://trunkbaseddevelopment.com/) or [master-only](https://www.youtube.com/watch?v=MWz-9uyHP4s).\n\n## 🚀 Usage\n\nWith the following example after creating a new release with tag `v2.0.1` on branch `release`,\na new commit will appear in that same branch with both `package.json` and `app.yaml` updated\nwith the version field to `2.0.1`.\n\n```yaml\nname: Upgrade Version\non:\n  release:\n    types: [published]\n\njobs:\n  upgrade-version:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: pocket-apps/action-update-version@v1\n        with:\n          files: 'package.json, app.yaml'\n          version-regexp: '\\d+.\\d+.\\d+'\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\nThe action will fail if:\n- Both `repo-token` and `branch-name` are not supplied\n- The tag cannot be found by `octokit`\n- The regular expression cannot match the release tag\n- You specify a file with unsupported extension\n\n- Supported file extensions: `json`, `yaml` and `yml`. To add one simply submit a PR with a new parser on the `main.ts` file.\n\n## ⚙ Inputs\n\nBy supplying the `repo-token` the commit will use the release information: author and branch.\n\nYou can change the branch commit target and the commit author if you want.\n\n**Name**|**Description**|**Default**\n-----|-----|-----\nfiles|Comma separated list of files to update its version field|package.json\nversion-regexp|Regular expression to match release tag name|\\d+.\\d+.\\d+\nrepo-token|GitHub token to get the release information in order to push to branch|`null` \ncommit-message|Commit message for files update. The %version% will get substituted|ci: update version to v%version%\nspacing-level|Number of spaces for formatted files|`2`\nbranch-name|Default branch name to push changes if not repo-token is provided|*Release target branch* \nauthor-name|Commit author name|*Release author name* \nauthor-email|Commit author email|*Release author email* \n\n## 👋 Support\n\nIf you find our work useful, you can [support our work](https://github.com/sponsors/pocket-apps) and win a burrito 🌯\n","funding_links":["https://github.com/sponsors/pocket-apps"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimtor%2Faction-update-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimtor%2Faction-update-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimtor%2Faction-update-version/lists"}