mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-09-30 19:08:03 +03:00
132 lines
4.1 KiB
YAML
132 lines
4.1 KiB
YAML
# Copyright (C) 2024–present Loren Eteval & contributors <loren.eteval@proton.me>
|
||
#
|
||
# This file is part of Furious.
|
||
#
|
||
# This program is free software: you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
# the Free Software Foundation, either version 3 of the License, or
|
||
# (at your option) any later version.
|
||
#
|
||
# This program is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
#
|
||
# You should have received a copy of the GNU General Public License
|
||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
||
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@v7
|
||
- name: Install libegl1
|
||
run: |
|
||
sudo apt update && sudo apt install -y libegl1
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v7
|
||
with:
|
||
python-version: "3.12"
|
||
check-latest: true
|
||
- name: Download Python dependencies & latest asset files
|
||
run: |
|
||
python -c "import sys; print(sys.version)"
|
||
python -m pip install --upgrade pip
|
||
python -m pip install setuptools wheel
|
||
python -m pip install -r requirements.txt
|
||
python -m pip install requests
|
||
python Deploy.py --download
|
||
- name: Build a binary wheel and a source tarball
|
||
run: |
|
||
python setup.py sdist bdist_wheel
|
||
- name: Store the distribution packages
|
||
uses: actions/upload-artifact@v7
|
||
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
|
||
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@v8
|
||
with:
|
||
name: python-package-distributions
|
||
path: dist/
|
||
- name: Publish distribution to PyPI
|
||
uses: pypa/gh-action-pypi-publish@release/v1
|
||
|
||
deploy-binaries:
|
||
name: Build binaries
|
||
uses: ./.github/workflows/daily-matrix-build.yml
|
||
|
||
github-release:
|
||
name: Upload to GitHub Release
|
||
needs:
|
||
- deploy-binaries
|
||
- 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@v8
|
||
with:
|
||
pattern: binary-distributions-*
|
||
merge-multiple: true
|
||
path: dist/
|
||
- name: Create GitHub Release
|
||
env:
|
||
GITHUB_TOKEN: ${{ github.token }}
|
||
run: >-
|
||
gh release create
|
||
'${{ github.ref_name }}'
|
||
--repo '${{ github.repository }}'
|
||
--notes ""
|
||
--generate-notes
|
||
--title 'Furious ${{ github.ref_name }}'
|
||
- name: Upload artifact 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 }}'
|
||
|
||
publish-winget:
|
||
name: Publish to WinGet
|
||
needs:
|
||
- github-release
|
||
runs-on: windows-latest
|
||
steps:
|
||
- uses: vedantmgoyal9/winget-releaser@main
|
||
with:
|
||
identifier: LorenEteval.Furious
|
||
release-tag: ${{ github.ref_name }}
|
||
installers-regex: '^Furious-.*-windows10-(?:amd64|arm64)\.zip$'
|
||
max-versions-to-keep: 5
|
||
token: ${{ secrets.WINGET_TOKEN }}
|