{"id":14985866,"url":"https://github.com/platomo/update-version-py-action","last_synced_at":"2026-01-06T01:38:31.436Z","repository":{"id":256203718,"uuid":"854581636","full_name":"platomo/update-version-py-action","owner":"platomo","description":"Update value of a variable (__version__) in a python file (version.py)","archived":false,"fork":false,"pushed_at":"2024-09-12T14:03:07.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-21T00:39:02.896Z","etag":null,"topics":["actions"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/platomo.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}},"created_at":"2024-09-09T12:36:24.000Z","updated_at":"2024-09-09T13:12:40.000Z","dependencies_parsed_at":"2024-09-09T15:44:11.155Z","dependency_job_id":"c6cd481b-03f7-4ff4-a537-a96b0b1c5090","html_url":"https://github.com/platomo/update-version-py-action","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"96984cb3b56a90b4a947a2b65121f5cb55e9c1b4"},"previous_names":["platomo/update-version-py-action"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platomo%2Fupdate-version-py-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platomo%2Fupdate-version-py-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platomo%2Fupdate-version-py-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platomo%2Fupdate-version-py-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/platomo","download_url":"https://codeload.github.com/platomo/update-version-py-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239792176,"owners_count":19697884,"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"],"created_at":"2024-09-24T14:11:48.172Z","updated_at":"2026-01-06T01:38:26.395Z","avatar_url":"https://github.com/platomo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛠️ GitHub Action: Update Version Variable in Python File\n\n## 📄 Description\n\nThis action updates the version number of a Python package by modifying a specific\nvariable (default: `__version__`) in a Python file (default: `version.py`). If the\nversion is set to `nightly`, the current date and time will be appended to the version.\n\n## ⚙️ Inputs\n\n| Name        | Description                                                      | Required |    Default    |\n| ----------- | ---------------------------------------------------------------- | :------: | :-----------: |\n| `version`   | Version number to set. Defaults to generating a nightly version. |    No    |   `nightly`   |\n| `variable`  | The variable to update (e.g., `__version__`).                    |    No    | `__version__` |\n| `file-path` | Path to the directory containing the `version.py` file.          |    No    |      `.`      |\n| `file-name` | Name of the file where the version variable is located.          |    No    | `version.py`  |\n\n## 🚀 How It Works\n\nThe action searches for a line in the specified file (default: `version.py`) that starts\nwith the `variable =` pattern (default: `__version__ =`). It replaces the current\nversion number with either a custom version or an automatically generated nightly\nversion.\n\n- If `version` is set to `nightly`, a version in the format `0.0aYYYYMMDDHHMMSS`\n  will be generated. This format is compliant with local version identifiers in [PEP-440](https://peps.python.org/pep-0440/#local-version-identifiers).\n- If a specific version is provided, it will replace the existing version.\n\n## 📦 Usage Example\n\n```yaml\nname: Update Package Version\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  update-version:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v2\n\n      - name: Update Python package version\n        uses: platomo/update-version-py-action@v1\n        with:\n          version: \"1.0.0\"\n          file-path: \"my_package\"\n```\n\nIn this example, the **version** variable in my_package/version.py is updated to 1.0.0.\n\n## 🆕 Create a new release\n\nTo create a new release of the action, use the GitHub release function and create a new\ntag according to semantic version requirements (vX.Y.Z).\nThe GitHub workflow `major-release-tag.yml` will automatically move the major version\ntag to the new release.\n\n## ⚖️ License\n\nGNU GENERAL PUBLIC LICENSE Version 3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatomo%2Fupdate-version-py-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplatomo%2Fupdate-version-py-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatomo%2Fupdate-version-py-action/lists"}