-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Update Update Update Update Update Update Update Update Update Update Update Update Update Update Update Update Help, Readme Example
- Loading branch information
Ben Goldsmith
authored and
Ben Goldsmith
committed
Oct 31, 2023
1 parent
e88d803
commit 6a898b2
Showing
7 changed files
with
137 additions
and
27 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,29 @@ | ||
name: Python Package & Deploy to PyPI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy-to-pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
pip install twine | ||
- name: Bump Version | ||
run: | | ||
sed -i "s/0.0.0/$(date +"%Y.%m%d.${{github.run_number}}")/g" setup.py | ||
- name: Create Python Package | ||
run: | | ||
python3 setup.py sdist | ||
- name: Upload to Twine | ||
run: | | ||
twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
.vscode/ | ||
aws_google_saml.egg-info/ | ||
dist/ | ||
__pycache__/ | ||
__pycache__/ | ||
.DS_Store | ||
aws-google-saml.rb |
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Deploy script to automate process of release | ||
|
||
rm -rf dist | ||
|
||
python3 setup.py sdist | ||
|
||
twine upload dist/* | ||
|
||
rm -rf venv # Just incase it wasn't cleared before | ||
|
||
sleep 20 # need to wait for PyPi to be ready with new package | ||
|
||
python3 -m venv venv | ||
|
||
source venv/bin/activate | ||
|
||
pip3 install --no-cache-dir aws-google-saml homebrew-pypi-poet | ||
|
||
poet --formula aws-google-saml > aws-google-saml.rb | ||
|
||
deactivate | ||
|
||
rm -rf venv | ||
|
||
# Replace 'virtualenv_create(libexec, "python3")' with nothing | ||
sed -i '' 's/virtualenv_create(libexec, "python3")//g' aws-google-saml.rb | ||
|
||
# replace 'Shiny new formula' with 'A user browser driven SAML authentication tool for AWS' | ||
sed -i '' 's/Shiny new formula/A user browser driven SAML authentication tool for AWS/g' aws-google-saml.rb | ||
|
||
code aws-google-saml.rb | ||
|
||
# Copy and upload to Github |
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