@@ -14,41 +14,51 @@ jobs:
1414 id-token : write
1515
1616 steps :
17- - name : Checkout repository
18- uses : actions/checkout@v3
19- with :
20- fetch-depth : 0
21-
22- - name : Set up Python 3.7
23- uses : actions/setup-python@v4
24- with :
25- python-version : ' 3.7'
26-
27- - name : Install Poetry
28- run : curl -sSL https://install.python-poetry.org | python - -y
29-
30- - name : Update PATH
31- run : echo "$HOME/.local/bin" >> $GITHUB_PATH
32-
33- - name : Install Poetry Plugin
34- run : poetry self add "poetry-dynamic-versioning[plugin]"
35-
36- - name : Check Pre-Release Version
37- id : check-version
38- run : |
39- echo "::debug::Package version: $(poetry version --short)"
40- [[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
41-
42- - name : Exit if not Pre-Release Version
43- if : steps.check-version.outputs.prerelease != 'true'
44- env :
45- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46- run : |
47- gh run cancel ${{ github.run_id }}
48- gh run watch ${{ github.run_id }}
49-
50- - name : Build package
51- run : poetry build
52-
53- - name : Publish a Python distribution to PyPI
54- uses : pypa/gh-action-pypi-publish@release/v1
17+ - name : Run Cimon
18+ uses : cycodelabs/cimon-action@v0
19+ with :
20+ client-id : ${{ secrets.CIMON_CLIENT_ID }}
21+ secret : ${{ secrets.CIMON_SECRET }}
22+ prevent : true
23+ fail-on-error : true
24+ allowed-hosts : >
25+ files.pythonhosted.org
26+ install.python-poetry.org
27+ pypi.org
28+ upload.pypi.org
29+
30+ - name : Checkout repository
31+ uses : actions/checkout@v3
32+ with :
33+ fetch-depth : 0
34+
35+ - name : Set up Python 3.7
36+ uses : actions/setup-python@v4
37+ with :
38+ python-version : ' 3.7'
39+
40+ - name : Setup Poetry
41+ uses : snok/install-poetry@v1
42+
43+ - name : Install Poetry Plugin
44+ run : poetry self add "poetry-dynamic-versioning[plugin]"
45+
46+ - name : Check Pre-Release Version
47+ id : check-version
48+ run : |
49+ echo "::debug::Package version: $(poetry version --short)"
50+ [[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
51+
52+ - name : Exit if not Pre-Release Version
53+ if : steps.check-version.outputs.prerelease != 'true'
54+ env :
55+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56+ run : |
57+ gh run cancel ${{ github.run_id }}
58+ gh run watch ${{ github.run_id }}
59+
60+ - name : Build package
61+ run : poetry build
62+
63+ - name : Publish a Python distribution to PyPI
64+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments