-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[StepSecurity] Apply security best practices (#6)
Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: Krisztian Notaisz <[email protected]>
- Loading branch information
1 parent
a93ca03
commit e2af14a
Showing
3 changed files
with
21 additions
and
10 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 |
---|---|---|
|
@@ -13,6 +13,9 @@ on: | |
- minor | ||
- major | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
|
@@ -22,11 +25,11 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | ||
with: | ||
python-version: 3.7 | ||
- run: pip install --upgrade pip | ||
|
@@ -37,7 +40,7 @@ jobs: | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- run: bumpver update --${{inputs.releaseType}} | ||
- run: python -m build | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1 | ||
with: | ||
name: package | ||
path: dist/ | ||
|
@@ -47,19 +50,19 @@ jobs: | |
needs: [build] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: package | ||
path: dist/ | ||
|
||
- name: Publish to Test PyPI | ||
if: ${{github.ref_name == 'test_pypi'}} | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
uses: pypa/gh-action-pypi-publish@61da13deb5f5124fb1536194f82ed3d9bbc7e8f3 # release/v1 | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
- name: Publish to PyPI | ||
if: ${{github.ref_name != 'test_pypi'}} | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
uses: pypa/gh-action-pypi-publish@61da13deb5f5124fb1536194f82ed3d9bbc7e8f3 # release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_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