Update __init__.py #19
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
name: cryptoFuzz Package | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Lint with flake8 | |
run: | | |
pip install flake8 | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Get Bumper File | |
run: curl -o bump_version.py ${{ secrets.BUMP_VER }} | |
- name: Run Bump script | |
run: python bump_version.py | |
- name: Remove Bump Script | |
run: rm -r bump_version.py | |
- name: Extract version from file | |
id: get_version | |
run: | | |
VERSION=$(cat version.txt) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Bump version | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
git add setup.py cryptofuzz/__init__.py | |
git commit -m 'version Update Mode' | |
git push origin main | |
- name: Build package | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Create Git tag | |
run: | | |
git tag v${{ env.VERSION }} | |
git push origin v${{ env.VERSION }} | |
- name: Create ZIP file | |
run: | | |
zip -r cryptofuzz-v${{ env.VERSION }}.zip dist/ | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: cryptofuzz-v${{ env.VERSION }}.zip | |
tag_name: v${{ env.VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
twine upload dist/* |