Skip to content

Commit

Permalink
Merge pull request #39 from fingerprintjs/use-semantic-release
Browse files Browse the repository at this point in the history
Use semantic release
  • Loading branch information
ilfa authored Aug 10, 2023
2 parents 4a7674f + 9373a93 commit dc28ab4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 61 deletions.
61 changes: 3 additions & 58 deletions .github/workflows/analyze-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,6 @@ permissions:
pull-requests: write
contents: write
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
id: commitlint
- if: ${{ failure() && steps.commitlint.outcome == 'failure' }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: Commitlint
recreate: true
message: |
## Wrong commit message format detected
We use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) in our project.
> **Warning**
> Probably you forgot to activate local git hooks.
Run the next command in the project root to activate local hooks:
```sh
sh ./install_hooks.sh
```
More info you can find in [job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
- if: ${{ success() }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: Commitlint
hide: true
hide_classify: "OUTDATED"
release-notes-comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Collect semantic-release-info
id: semantic_release_info
uses: fingerprintjs/action-semantic-release-info@v1
- if: ${{ steps.semantic_release_info.outputs.no_release == 'false' }}
name: Add comment to the PR
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: ReleasePreview
recreate: true
message: |
## This PR will create a ${{steps.semantic_release_info.outputs.type}} release :rocket:
${{steps.semantic_release_info.outputs.notes}}
- if: ${{ steps.semantic_release_info.outputs.no_release == 'true' }}
name: Add comment to the PR
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: ReleasePreview
recreate: true
message: |
## This PR will not create a new release :rocket:
analyze-commits:
name: Generate docs and coverage report
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
2 changes: 1 addition & 1 deletion fingerprint_pro_server_api_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
try:
from multiprocessing.pool import ThreadPool
self.pool = ThreadPool()
except ImportError:
except (ImportError, OSError):
from fingerprint_pro_server_api_sdk.dummy_pool import DummyPool
self.pool = DummyPool()
else:
Expand Down
2 changes: 1 addition & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ done
if [[ $VERSION =~ (.*-dev\.)([0-9]+) ]]; then
BASE_VERSION=${BASH_REMATCH[1]}
DEV_NUMBER=${BASH_REMATCH[2]}
VERSION="${BASE_VERSION%-dev.}dev${DEV_NUMBER}"
VERSION="${BASE_VERSION%-dev.}.dev${DEV_NUMBER}"
fi

# jar was downloaded from here https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.34/
Expand Down
2 changes: 1 addition & 1 deletion template/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ApiClient(object):
try:
from multiprocessing.pool import ThreadPool
self.pool = ThreadPool()
except ImportError:
except (ImportError, OSError):
from {{packageName}}.dummy_pool import DummyPool
self.pool = DummyPool()
else:
Expand Down

0 comments on commit dc28ab4

Please sign in to comment.