diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4dd6305 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,137 @@ +name: Create Release + +on: + push: + branches: + - main + - Dev + +permissions: + contents: write + +jobs: + create-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for GitVersion to work correctly + + - name: Install GitVersion + uses: GitTools/actions/gitversion/setup@v0 + with: + versionSpec: '5.x' + + - name: Determine Version + id: gitversion + uses: GitTools/actions/gitversion/execute@v0 + + - name: Extract Release Notes from Changelog + id: extract-changelog + uses: release-flow/keep-a-changelog-action@v3.0.0 + with: + command: query + version: unreleased + + + - name: Update CHANGELOG.md + if: github.ref == 'refs/heads/main' # Only update for stable releases + uses: release-flow/keep-a-changelog-action@v3.0.0 + with: + command: bump + version: unreleased + + - name: Commit Updated CHANGELOG.md + if: github.ref == 'refs/heads/main' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Update CHANGELOG for release ${{ steps.gitversion.outputs.semVer }}" + file_pattern: "CHANGELOG.md" + + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install Required Python Packages + run: pip install build tomlkit + + - name: Update Version in pyproject.toml + run: | + python - <' gets removed -## v0.0.2.11 +## [v0.0.2-beta.11] - 2025-01-08 -### New Features +### Added - Core: add function decode_api_id and encode_api_id to convert between nodeID and normal ID -## v0.0.2.10 +## [v0.0.2-beta.10] - 2024-12-18 -### New Features +### Added - Core: add enum LogLevel - Core: add method set_log_level to change the log level -### Breaking Changes +### Changed - Core: init: parameter for logger has been added, if not provided, a new logger will be created -## v0.0.2.9 +## [v0.0.2-beta.9] - 2024-12-11 -### New Features +### Added - Request, Workflow, Task, Person, Team: add non static methods: ref_str() --> return a reference string - Request: add RequestCategory enum @@ -51,62 +68,62 @@ - Tests: add tests for Request - Tests: add pre-commit hooks yaml file -### Bugfixes +### Fixed - Person, Workflow, Task: inherit JsonSerializableDict --> make serializable - Request: close: make it possible to close a without a note (using default note) -### Breaking Changes +### Changed - Request: request.created_by, request.requested_by, request.requested_for, request.member are now Person objects - Workflow: workflow.manager is now a Person object -## v0.0.2.8 +## [v0.0.2-beta.8] - 2024-12-10 -### Bug Fixes +### Fixed - Core: __append_per_page: exclude auto append for /me -### Breaking Changes +### Changed - Request: request.workflow is now a Workflow object instead of a dict --> request.workflow.id instead of request.workflow['id'] -## v0.0.2.7 +## [v0.0.2-beta.7] - 2024-12-10 ### Bug Fixes - Task: `__update_object__` fixed -## v0.0.2.6 +## [v0.0.2-beta.6] - 2024-12-10 ### Bug Fixes - Task: Fix update method -## v0.0.2.5 +## [v0.0.2-beta.5] - 2024-12-10 ### Bug Fixes - Task: Fix update method -## v0.0.2.4 +## [v0.0.2-beta.4] - 2024-12-10 -### New Features +### Added - People: add non static methods: enable, archive, trash, restore - People: add static methods: create, get_people - Workflows: add static methods: get_workflows -## v0.0.2.3 +## [v0.0.2-beta.3] - 2024-12-06 -### New Features +### Added - Task: add non static methods: get_workflow, close, approve, reject, cancel, create - Workflow: add non static methods: create_task -## v0.0.2.2 +## [v0.0.2-beta.2] - 2024-12-06 -### New Features +### Added - Task: add base functionality for tasks - Workflow: add methods: get_task_by_template_id, get_tasks @@ -117,23 +134,23 @@ - Workflow: Fix toString / __str__ method -### Breaking Changes +### Changed - Request: renamed get_request to get_requests - Workflow: get_workflow_task_by_template_id now returns a Task object List -## v0.0.2.1 +## [v0.0.2-beta.1] - 2024-12-06 -### New Features +### Added - Workflow: add base functionality for workflows - People: add base functionality for people - core: automatically get api user person object (optional, default: True) -## v0.0.2 +## [v0.0.2-beta.0] - 2024-12-05 -### New Features +### Added - Request: add methods: archive, trash, restore @@ -142,10 +159,10 @@ - Request: Fix get_request, get_notes method -## v0.0.1 +## [v0.0.1] - 2024-12-05 -### New Features +### Added - Pagination: auto pagination get requests - Retry-after: auto retry after 429 status code -- custom fields conversion (from and to object/dict) \ No newline at end of file +- custom fields conversion (from and to object/dict) diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..1efa201 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,43 @@ +mode: ContinuousDelivery +next-version: "0.3.0" +major-version-bump-message: '\s?(breaking|major|breaking\schange)' +minor-version-bump-message: '(adds?|features?|minor)\b' +patch-version-bump-message: '\s?(fix|patch)' +no-bump-message: '\+semver:\s?(none|skip)' +assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}' +branches: + master: + tag: "" + regex: ^main$ + develop: + tag: preview + regex: ^Dev$ + source-branches: ['master'] + pull-request: + tag: PR + feature: + tag: alpha + increment: Minor + regex: f(eature(s)?)?[\/-] + source-branches: ['master'] + hotfix: + tag: fix + increment: Patch + regex: (hot)?fix(es)?[\/-] + source-branches: ['master'] + +ignore: + sha: [] +merge-message-formats: {} + + +# feature: +# tag: useBranchName +# increment: Minor +# regex: f(eature(s)?)?[/-] +# source-branches: ['master'] +# hotfix: +# tag: fix +# increment: Patch +# regex: (hot)?fix(es)?[/-] +# source-branches: ['master'] diff --git a/pyproject.toml b/pyproject.toml index 73061fd..2b51858 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,39 +1,39 @@ -[project] -name = "xurrent" -version = "0.0.2.12" -authors = [ - { name="Fabian Steiner", email="fabian@stei-ner.net" }, -] -description = "A python module to interact with the Xurrent API." -readme = "README.md" -requires-python = ">=3.9" -classifiers = [ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", -] - -[project.urls] -Homepage = "https://github.com/fasteiner/xurrent-python" -Issues = "https://github.com/fasteiner/xurrent-python/issues" -[tool.poetry] -name = "xurrent" -version = "0.0.2.11" -description = "A python module to interact with the Xurrent API." -authors = ["Ing. Fabian Franz Steiner BSc. "] -readme = "README.md" - -[tool.poetry.dependencies] -python = ">=3.9" -requests = "^2.32.3" - - -[tool.poetry.group.dev.dependencies] -pytest = "^8.3.4" -python-dotenv = "^1.0.1" -mock = "^5.1.0" -pre-commit = "^4.0.1" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[project] +name = "xurrent" +version = "0.4.0-preview.169" +authors = [ + { name="Fabian Steiner", email="fabian@stei-ner.net" }, +] +description = "A python module to interact with the Xurrent API." +readme = "README.md" +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/fasteiner/xurrent-python" +Issues = "https://github.com/fasteiner/xurrent-python/issues" +[tool.poetry] +name = "xurrent" +version = "0.4.0-preview.169" +description = "A python module to interact with the Xurrent API." +authors = ["Ing. Fabian Franz Steiner BSc. "] +readme = "README.md" + +[tool.poetry.dependencies] +python = ">=3.9" +requests = "^2.32.3" + + +[tool.poetry.group.dev.dependencies] +pytest = "^8.3.4" +python-dotenv = "^1.0.1" +mock = "^5.1.0" +pre-commit = "^4.0.1" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api"