Skip to content

v1.0.2 "Fixing my own mistakes, again" #8

v1.0.2 "Fixing my own mistakes, again"

v1.0.2 "Fixing my own mistakes, again" #8

Workflow file for this run

# .github/workflows/build-release.yml
name: Build Release
permissions:
contents: write
on:
release:
types: [published]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install nuitka json5
python -m pip install --upgrade pip
- name: Build with Nuitka
run: |
cd src
python -m nuitka --standalone \
--output-filename=fancyfetch \
--output-dir=dist \
--include-module=setup \
--include-module=constants \
--include-module=formatting \
--include-module=shared \
--include-module=configurationhandler \
--nofollow-import-to=src.defaults \
--assume-yes-for-downloads \
main.py
shell: bash
- name: Copy defaults directory
run: |
cp -r src/defaults src/dist/main.dist/defaults
shell: bash
- name: Create archive (Linux/Mac)
if: runner.os != 'Windows'
run: |
cd src/dist
tar -czf fancyfetch-${{runner.os}}.tar.gz main.dist/
mv fancyfetch-${{runner.os}}.tar.gz ../../
- name: Create archive (Windows)
if: runner.os == 'Windows'
run: |
cd src/dist
7z a fancyfetch-Windows.zip main.dist/
move fancyfetch-Windows.zip ../../
shell: cmd
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: fancyfetch-${{runner.os}}
path: |
./fancyfetch-*.tar.gz
./fancyfetch-*.zip
retention-days: 30
- name: Upload to release (Linux/Mac)
if: github.event_name == 'release' && runner.os != 'Windows'
uses: softprops/action-gh-release@v1
with:
files: ./fancyfetch-*.tar.gz
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Upload to release (Windows)
if: github.event_name == 'release' && runner.os == 'Windows'
uses: softprops/action-gh-release@v1
with:
files: ./fancyfetch-*.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}