-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from fingerprintjs/use-semantic-release
Use semantic-release for the release workflow
- Loading branch information
Showing
10 changed files
with
184 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
publish: | ||
|
@@ -27,14 +28,16 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install python-semantic-release | ||
pip install wheel | ||
pip install twine | ||
- name: Generate code with new version | ||
run: ./generate.sh -v $(semantic-release print-version) | ||
|
||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@c633414ae2a5518d21b852be66eac1cbc2dd8e87 # v7.34.6 | ||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@91ab76a4a393a8d0c4739e9aea1818b56bc953ea | ||
with: | ||
github_token: ${{ secrets.GH_RELEASE_TOKEN }} | ||
repository_username: ${{ secrets.PYPI_USERNAME }} | ||
repository_password: ${{ secrets.PYPI_PASSWORD }} | ||
extra_plugins: | | ||
@semantic-release/[email protected] | ||
[email protected] | ||
[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"branches": [ | ||
"main", | ||
{ | ||
"name": "dev", | ||
"prerelease": true | ||
} | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"releaseRules": [ | ||
{ | ||
"type": "build", | ||
"scope": "deps", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "docs", | ||
"scope": "README", | ||
"release": "patch" | ||
} | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalCommits", | ||
"presetConfig": { | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "feature", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "Performance Improvements" | ||
}, | ||
{ | ||
"type": "revert", | ||
"section": "Reverts" | ||
}, | ||
{ | ||
"type": "docs", | ||
"scope": "README", | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "build", | ||
"scope": "deps", | ||
"section": "Build System" | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Documentation", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "Styles", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Miscellaneous Chores", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Code Refactoring", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "build", | ||
"section": "Build System", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "Continuous Integration", | ||
"hidden": true | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "./generate.sh -v \"${nextRelease.version}\"" | ||
} | ||
], | ||
"semantic-release-pypi", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"generate.sh", | ||
"CHANGELOG.md", | ||
"README.md", | ||
"setup.py", | ||
"fingerprint_pro_server_api_sdk/configuration.py", | ||
"fingerprint_pro_server_api_sdk/api_client.py", | ||
"fingerprint_pro_server_api_sdk/api/fingerprint_api.py", | ||
"test/test_fingerprint_api.py" | ||
] | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
[semantic_release] | ||
version_variable = generate.sh:VERSION,test/test_fingerprint_api.py:VERSION | ||
version_source = tag | ||
commit_version_number = true | ||
branch = main | ||
include_additional_files = README.md,setup.py,fingerprint_pro_server_api_sdk/configuration.py,fingerprint_pro_server_api_sdk/api_client.py,fingerprint_pro_server_api_sdk/api/fingerprint_api.py,test/test_fingerprint_api.py | ||
commit_message = chore(release): {version} [skip ci] | ||
[metadata] | ||
version = 2.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters