-
Notifications
You must be signed in to change notification settings - Fork 92
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 #99 from BlakeTnr/master
Fix PyPI setup.py formatting and added GitHub Actions PyPI publishing
- Loading branch information
Showing
4 changed files
with
38 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build and upload to PyPI | ||
run-name: Building and releasing to PyPI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/pymetasploit3 | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: Checkout files | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: master | ||
- name: Replace run number and attempt in setup.py | ||
uses: jacobtomlinson/gha-find-replace@v3 | ||
with: | ||
find: "GITHUB_RUN_NUMBER.GITHUB_RUN_ATTEMPT" | ||
replace: ${{ github.run_number }}.${{ github.run_attempt }} | ||
regex: false | ||
include: "setup.py" | ||
- name: Debug setup.py | ||
run: cat setup.py | ||
- name: Build distribution | ||
run: python3 setup.py sdist | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
|
@@ -12,4 +12,4 @@ pytest = "*" | |
twine = "*" | ||
|
||
[requires] | ||
python_version = "3.7" | ||
python_version = "3.7" |
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ def read(fname): | |
setup( | ||
name='pymetasploit3', | ||
author='Dan McInerney', | ||
version='1.0', | ||
version='1.0.GITHUB_RUN_NUMBER.GITHUB_RUN_ATTEMPT', | ||
author_email='[email protected]', | ||
description='A full-fledged msfrpc library for Metasploit framework.', | ||
license='GPL', | ||
|
@@ -27,5 +27,6 @@ def read(fname): | |
], | ||
url='https://github.com/DanMcInerney/pymetasploit3', | ||
download_url='https://github.com/DanMcInerney/pymetasploit3/zipball/master', | ||
long_description=read('README.md') | ||
long_description=read('README.md'), | ||
long_description_content_type="text/markdown" | ||
) |