Skip to content

Commit

Permalink
Merge pull request #14 from paveldat/dev/pdat
Browse files Browse the repository at this point in the history
Fix deploy job and add release job
  • Loading branch information
paveldat authored Sep 12, 2023
2 parents 467dea1 + 77b6b99 commit 5869f68
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/deploy-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
id: verify-changed-files
with:
files: |
src/**/*.py
setup.cfg
src/**/*.py
setup.cfg
- name: Download artifacts
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: actions/download-artifact@v3
Expand All @@ -82,3 +82,25 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: deploy
steps:
- uses: actions/checkout@v3
- name: Set version release
run: |
VER=$(cat setup.cfg | grep version | cut -d "=" -f 2 | xargs)
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
echo "RELEASE_VERSION=$VER" >> $GITHUB_ENV
echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: v${{ env.RELEASE_VERSION }}
body: ${{ env.COMMIT_MESSAGE }}
draft: false
prerelease: false
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ url = https://github.com/paveldat/God-s-eye
[options]
package_dir =
=src

packages =
clickjacking
dns_lookup
Expand All @@ -24,6 +25,7 @@ packages =
ip_info_finder
pwned
phone_info

install_requires =
requests >= 2.25.1
dnspython >= 2.2.1
Expand Down

0 comments on commit 5869f68

Please sign in to comment.