mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-02 20:07:59 +03:00
429 lines
11 KiB
YAML
429 lines
11 KiB
YAML
name: Github Deploy
|
|
|
|
on: [push, pull_request]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
build-distribution:
|
|
name: Build distribution
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Set up Python venv
|
|
run: |
|
|
python3 -m venv .venv
|
|
source .venv/bin/activate
|
|
python3 --version
|
|
|
|
- name: Install libegl1
|
|
run: |
|
|
sudo apt update && sudo apt install -y libegl1
|
|
|
|
- name: Install setuptools, wheel
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
setuptools wheel
|
|
|
|
- name: Install requirements-nocore.txt
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
-r requirements-nocore.txt
|
|
|
|
- name: Build a binary wheel and a source tarball
|
|
run: python3 setup.py sdist bdist_wheel
|
|
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: |
|
|
dist/*.tar.gz
|
|
dist/*.whl
|
|
|
|
publish-to-pypi:
|
|
name: >-
|
|
Publish Python distribution to PyPI
|
|
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
needs:
|
|
- build-distribution
|
|
- deploy-binaries-macOS-x86_64-python311
|
|
- deploy-binaries-macOS-arm64-python311
|
|
- deploy-binaries-macOS-arm64-python312
|
|
- deploy-binaries-windows-python312
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: deploy-pypi
|
|
url: https://pypi.org/p/Furious-GUI
|
|
permissions:
|
|
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
- name: Publish distribution to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
deploy-binaries-macOS-x86_64-python311:
|
|
name: Deploy binaries on macos-13 Python 3.11
|
|
runs-on: macos-13
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
brew install create-dmg
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11"
|
|
check-latest: true
|
|
|
|
- name: Set up Python venv
|
|
run: |
|
|
python3 -m venv .venv
|
|
source .venv/bin/activate
|
|
python3 --version
|
|
|
|
- name: Install setuptools, wheel
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
setuptools wheel
|
|
|
|
- name: Install specific PySide6-Essentials on OS
|
|
run: |
|
|
python3 -m pip install PySide6-Essentials==6.4.3
|
|
|
|
- name: Install requirements-nocore.txt
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
-r requirements-nocore.txt
|
|
|
|
- name: Install nuitka, imageio
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
"nuitka==1.8.6" imageio
|
|
|
|
- name: Set up go 1.20
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20"
|
|
|
|
- name: Install go 1.20 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "hysteria > 1.3.5"
|
|
|
|
- name: Set up go 1.22
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- name: Install go 1.22 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "Xray-core >= 1.8.8" "hysteria2 >= 2.0.4" "tun2socks > 2.5.2"
|
|
|
|
- name: Run deploy script
|
|
run: |
|
|
python3 Deploy.py
|
|
|
|
- name: Upgrade PySide6-Essentials to 6.5.3
|
|
run: |
|
|
python3 -m pip uninstall -y PySide6-Essentials shiboken6
|
|
python3 -m pip install PySide6-Essentials==6.5.3
|
|
|
|
- name: Run deploy script again
|
|
run: |
|
|
python3 Deploy.py
|
|
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: binary-distributions
|
|
path: |
|
|
*.dmg
|
|
|
|
deploy-binaries-macOS-arm64-python311:
|
|
name: Deploy binaries on macos-14 Python 3.11
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
brew install create-dmg
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11"
|
|
check-latest: true
|
|
|
|
- name: Set up Python venv
|
|
run: |
|
|
python3 -m venv .venv
|
|
source .venv/bin/activate
|
|
python3 --version
|
|
|
|
- name: Install setuptools, wheel
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
setuptools wheel
|
|
|
|
- name: Install specific PySide6-Essentials on OS
|
|
run: |
|
|
python3 -m pip install PySide6-Essentials==6.4.3
|
|
|
|
- name: Install requirements-nocore.txt
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
-r requirements-nocore.txt
|
|
|
|
- name: Install nuitka, imageio
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
"nuitka==1.8.6" imageio
|
|
|
|
- name: Set up go 1.20
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20"
|
|
|
|
- name: Install go 1.20 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "hysteria > 1.3.5"
|
|
|
|
- name: Set up go 1.22
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- name: Install go 1.22 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "Xray-core >= 1.8.8" "hysteria2 >= 2.0.4" "tun2socks > 2.5.2"
|
|
|
|
- name: Run deploy script
|
|
run: |
|
|
python3 Deploy.py
|
|
|
|
- name: Upgrade PySide6-Essentials to 6.5.3
|
|
run: |
|
|
python3 -m pip uninstall -y PySide6-Essentials shiboken6
|
|
python3 -m pip install PySide6-Essentials==6.5.3
|
|
|
|
- name: Run deploy script again
|
|
run: |
|
|
python3 Deploy.py
|
|
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: binary-distributions
|
|
path: |
|
|
*.dmg
|
|
|
|
deploy-binaries-macOS-arm64-python312:
|
|
name: Deploy binaries on macos-14 Python 3.12
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
brew install create-dmg
|
|
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
check-latest: true
|
|
|
|
- name: Set up Python venv
|
|
run: |
|
|
python3 -m venv .venv
|
|
source .venv/bin/activate
|
|
python3 --version
|
|
|
|
- name: Install setuptools, wheel
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
setuptools wheel
|
|
|
|
- name: Install specific PySide6-Essentials on OS
|
|
run: |
|
|
python3 -m pip install PySide6-Essentials==6.6.3.1
|
|
|
|
- name: Install requirements-nocore.txt
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
-r requirements-nocore.txt
|
|
|
|
- name: Install nuitka, imageio
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
nuitka imageio
|
|
|
|
- name: Set up go 1.20
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20"
|
|
|
|
- name: Install go 1.20 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "hysteria > 1.3.5"
|
|
|
|
- name: Set up go 1.22
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- name: Install go 1.22 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "Xray-core >= 1.8.8" "hysteria2 >= 2.0.4" "tun2socks > 2.5.2"
|
|
|
|
- name: Run deploy script
|
|
run: |
|
|
python3 Deploy.py
|
|
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: binary-distributions
|
|
path: |
|
|
*.dmg
|
|
|
|
deploy-binaries-windows-python312:
|
|
name: Deploy binaries on windows-2022 Python 3.12
|
|
runs-on: windows-2022
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
check-latest: true
|
|
|
|
- name: Set up Python venv
|
|
run: |
|
|
python3 -m venv .venv
|
|
.venv/Scripts/activate
|
|
python3 --version
|
|
|
|
- name: Install setuptools, wheel
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
setuptools wheel
|
|
|
|
- name: Install specific PySide6-Essentials on OS
|
|
run: |
|
|
python3 -m pip install PySide6-Essentials==6.6.3.1
|
|
|
|
- name: Install requirements-nocore.txt
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
-r requirements-nocore.txt
|
|
|
|
- name: Install nuitka, imageio
|
|
run: >-
|
|
python3 -m
|
|
pip install
|
|
nuitka imageio
|
|
|
|
- name: Set up go 1.20
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20"
|
|
|
|
- name: Install go 1.20 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "hysteria > 1.3.5"
|
|
|
|
- name: Set up go 1.22
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- name: Install go 1.22 dependencies
|
|
run: |
|
|
go version
|
|
python3 -m pip install "Xray-core >= 1.8.8" "hysteria2 >= 2.0.4" "tun2socks > 2.5.2"
|
|
|
|
- name: Run deploy script
|
|
run: |
|
|
python3 Deploy.py
|
|
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: binary-distributions
|
|
path: |
|
|
*.zip
|
|
|
|
github-release:
|
|
name: >-
|
|
Upload to GitHub Release
|
|
needs:
|
|
- publish-to-pypi
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write # IMPORTANT: mandatory for making GitHub Releases
|
|
id-token: write # IMPORTANT: mandatory for sigstore
|
|
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: binary-distributions
|
|
path: dist/
|
|
- name: Create GitHub Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
run: >-
|
|
gh release create
|
|
'${{ github.ref_name }}'
|
|
--repo '${{ github.repository }}'
|
|
--notes ""
|
|
--prerelease
|
|
--generate-notes
|
|
--title 'Furious ${{ github.ref_name }}'
|
|
- name: Upload artifact signatures to GitHub Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
# Upload to GitHub Release using the `gh` CLI.
|
|
run: >-
|
|
gh release upload
|
|
'${{ github.ref_name }}' dist/**
|
|
--repo '${{ github.repository }}'
|