Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swimmwatch/openapi-diff-semver-bump
A GitHub Action for getting appropriate updated SemVer OpenAPI package version.
https://github.com/swimmwatch/openapi-diff-semver-bump
github-actions openapi openapi-specification semver
Last synced: 23 days ago
JSON representation
A GitHub Action for getting appropriate updated SemVer OpenAPI package version.
- Host: GitHub
- URL: https://github.com/swimmwatch/openapi-diff-semver-bump
- Owner: swimmwatch
- License: mit
- Created: 2022-05-07T13:50:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-11T09:57:57.000Z (over 1 year ago)
- Last Synced: 2024-03-14T20:51:48.117Z (8 months ago)
- Topics: github-actions, openapi, openapi-specification, semver
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# openapi-diff-semver-bump
A GitHub Action for getting appropriate updated [SemVer](https://semver.org/) OpenAPI package version.## Usage
The following example [workflow steps](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow) will generate a new version by previous tag and updated state from [OpenAPITools/openapi-diff](https://github.com/OpenAPITools/openapi-diff).```yml
- name: "Find difference between OpenAPI specifications"
id: diff_state
uses: swimmwatch/[email protected]
with:
old-spec: "old_spec.json"
new-spec: "new_spec.json"
- name: "Get previous tag"
id: previous_tag
uses: WyriHaximus/github-action-get-previous-tag@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: "Get appropriate new package version"
id: updated_version
uses: swimmwatch/openapi-diff-semver-bump@v1
with:
package-version: ${{steps.previous_tag.outputs.tag}}
updated-state: ${{steps.diff_state.outputs.state}}
```## Options
The following input variables options can/must be configured:|Input variable|Necessity|Description|Default|
|----|----|----|----|
|`package-version`|Required|Package [SemVer](https://semver.org/) version||
|`updated-state`|Required|Output state from [OpenAPITools/openapi-diff](https://github.com/OpenAPITools/openapi-diff): `no_changes`, `incompatible`, `compatible`||## Outputs
- `new-package-version`: New package [SemVer](https://semver.org/) version e.g. `1.2.3`.## License
openapi-diff-semver-bump is licensed under the [MIT License](LICENSE).