📦 fastCrypter Package #45
This file contains hidden or 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: 📦 fastCrypter Package | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| 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.event_name == 'workflow_dispatch' | |
| 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 | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| run: curl -o bump_version.py ${{ secrets.BUMP_URL }} | |
| - name: 🔵 Run Bump script | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| run: python bump_version.py fastcrypter | |
| - name: 🟣 Remove Bump Script | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| run: rm -f bump_version.py | |
| - name: 🗳 Commit version bump | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add . | |
| git diff --staged --quiet || git commit -m "🔖 Bump version [automated]" | |
| git push origin main | |
| - name: 🔏 Build fastCrypter Package | |
| run: | | |
| python setup.py sdist bdist_wheel | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 📦 Publish package to PyPI | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| run: | | |
| twine upload dist/* | |
| - name: ✅ Create GitHub Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: "v${{ env.NEW_VERSION }}" | |
| name: "✅ v${{ env.NEW_VERSION }}" | |
| body: | | |
| ## fastCrypter New Release `v${{ env.NEW_VERSION }}` | |
| > [!NOTE] | |
| > A new version of fastCrypter has been released `v${{ env.NEW_VERSION }}`. Check out the latest features and updates in this release. | |
| ## 📦 Install via PyPI | |
| ### Windows | |
| ```bash | |
| pip install fastCrypter | |
| # or for a specific version | |
| pip install fastCrypter==${{ env.NEW_VERSION }} | |
| # upgrade | |
| pip install fastCrypter --upgrade | |
| ``` | |
| ### Linux & macOS | |
| ```bash | |
| pip3 install fastCrypter | |
| # or for a specific version | |
| pip3 install fastCrypter==${{ env.NEW_VERSION }} | |
| # upgrade | |
| pip3 install fastCrypter --upgrade | |
| ``` | |
| ## ⚙️ Install from GitHub Release Assets | |
| You can also install directly from the released archives: | |
| ### Windows | |
| ```bash | |
| pip install https://github.com/Pymmdrza/fastCrypter/releases/download/v${{ env.NEW_VERSION }}/fastCrypter-${{ env.NEW_VERSION }}.tar.gz | |
| # or | |
| pip install https://github.com/Pymmdrza/fastCrypter/releases/download/v${{ env.NEW_VERSION }}/fastCrypter-${{ env.NEW_VERSION }}-py3-none-any.whl | |
| ``` | |
| ### Linux & macOS | |
| ```bash | |
| pip3 install https://github.com/Pymmdrza/fastCrypter/releases/download/v${{ env.NEW_VERSION }}/fastCrypter-${{ env.NEW_VERSION }}.tar.gz | |
| # or | |
| pip3 install https://github.com/Pymmdrza/fastCrypter/releases/download/v${{ env.NEW_VERSION }}/fastCrypter-${{ env.NEW_VERSION }}-py3-none-any.whl | |
| ``` | |
| --- | |
| - [Documentation](https://fastcrypter.readthedocs.io/) | |
| - [PyPi Package](https://pypi.org/project/fastcrypter/${{ env.NEW_VERSION }}/) | |
| - [PyPi History](https://pypi.org/project/fastcrypter/${{ env.NEW_VERSION }}/#history) | |
| - [Description Package](https://pypi.org/project/fastcrypter/${{ env.NEW_VERSION }}/#description) | |
| - [Automatic Compilation](https://github.com/Pymmdrza/fastCrypter#automatic-compilation 'Automatic Compilation') | |
| - [Performance Benefits](https://github.com/Pymmdrza/fastCrypter#performance-benefits 'Performance Benefits') | |
| **Programmer and Owner:** @Pymmdrza | |
| files: | | |
| dist/fastCrypter-${{ env.NEW_VERSION }}.tar.gz | |
| dist/fastCrypter-${{ env.NEW_VERSION }}-py3-none-any.whl |