Skip to content

FastGet v3.0

FastGet v3.0 #1

Workflow file for this run

name: NABS Workflow (FastGet)
on:
release:
types: [published]
jobs:
build-and-release:
continue-on-error: true
strategy:
matrix:
include:
- os: macos-13
platform: macOS Intel
filename: FastGet-macos-amd64
- os: ubuntu-22.04
platform: Linux Intel/AMD
filename: FastGet-linux-amd64
- os: windows-2022
platform: Windows Intel/AMD
filename: FastGet-windows-amd64
- os: macos-14
platform: macOS Apple Silicon
filename: FastGet-macos-arm64
- os: ubuntu-22.04-arm
platform: Linux ARM
filename: FastGet-linux-arm64
- os: windows-11-arm
platform: Windows ARM
filename: FastGet-windows-arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name || github.ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Update pip and Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Download NABS
shell: bash
run: |
wget https://raw.githubusercontent.com/DiamondGotCat/NABS/refs/heads/main/pynabs.py
- name: Build (non-windows)
if: runner.os != 'Windows'
shell: bash
run: |
python pynabs.py -f fastget.py -m pyinstaller -o upload/${{ matrix.filename }}
python pynabs.py -f fastget.py -m nuitka -o upload/${{ matrix.filename }}-NUI
- name: Build (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
python pynabs.py -f fastget.py -m pyinstaller -o upload/${{ matrix.filename }}.exe
python pynabs.py -f fastget.py -m nuitka -o upload/${{ matrix.filename }}-NUI.exe
- name: Zip (non-windows)
if: runner.os != 'Windows'
shell: bash
run: |
cd upload
zip "${{ matrix.filename }}.zip" "${{ matrix.filename }}"
zip "${{ matrix.filename }}-NUI.zip" "${{ matrix.filename }}-NUI"
- name: Zip (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path "upload/${{ matrix.filename }}.exe" -DestinationPath "upload/${{ matrix.filename }}.zip"
Compress-Archive -Path "upload/${{ matrix.filename }}-NUI.exe" -DestinationPath "upload/${{ matrix.filename }}-NUI.zip"
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: upload/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}