Skip to content

Commit 4432c06

Browse files
committed
--
1 parent e26dee0 commit 4432c06

5 files changed

Lines changed: 140 additions & 404 deletions

File tree

.github/workflows/build.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: NABS Workflow (FastGet)
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-release:
9+
continue-on-error: true
10+
strategy:
11+
matrix:
12+
include:
13+
- os: macos-13
14+
platform: macOS Intel
15+
filename: FastGet-macos-amd64
16+
- os: ubuntu-22.04
17+
platform: Linux Intel/AMD
18+
filename: FastGet-linux-amd64
19+
- os: windows-2022
20+
platform: Windows Intel/AMD
21+
filename: FastGet-windows-amd64
22+
- os: macos-14
23+
platform: macOS Apple Silicon
24+
filename: FastGet-macos-arm64
25+
- os: ubuntu-22.04-arm
26+
platform: Linux ARM
27+
filename: FastGet-linux-arm64
28+
- os: windows-11-arm
29+
platform: Windows ARM
30+
filename: FastGet-windows-arm64
31+
runs-on: ${{ matrix.os }}
32+
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v3
36+
with:
37+
ref: ${{ github.event.release.tag_name || github.ref }}
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: '3.12'
43+
44+
- name: Update pip and Install dependencies
45+
run: |
46+
python -m pip install --upgrade pip
47+
pip install -r requirements.txt
48+
49+
- name: Download NABS
50+
shell: bash
51+
run: |
52+
wget https://raw.githubusercontent.com/DiamondGotCat/NABS/refs/heads/main/pynabs.py
53+
54+
- name: Build (non-windows)
55+
if: runner.os != 'Windows'
56+
shell: bash
57+
run: |
58+
python pynabs.py -f fastget.py -m pyinstaller -o upload/${{ matrix.filename }}
59+
python pynabs.py -f fastget.py -m nuitka -o upload/${{ matrix.filename }}-NUI
60+
61+
- name: Build (Windows)
62+
if: runner.os == 'Windows'
63+
shell: bash
64+
run: |
65+
python pynabs.py -f fastget.py -m pyinstaller -o upload/${{ matrix.filename }}.exe
66+
python pynabs.py -f fastget.py -m nuitka -o upload/${{ matrix.filename }}-NUI.exe
67+
68+
- name: Zip (non-windows)
69+
if: runner.os != 'Windows'
70+
shell: bash
71+
run: |
72+
cd upload
73+
zip "${{ matrix.filename }}.zip" "${{ matrix.filename }}"
74+
zip "${{ matrix.filename }}-NUI.zip" "${{ matrix.filename }}-NUI"
75+
76+
- name: Zip (Windows)
77+
if: runner.os == 'Windows'
78+
shell: pwsh
79+
run: |
80+
Compress-Archive -Path "upload/${{ matrix.filename }}.exe" -DestinationPath "upload/${{ matrix.filename }}.zip"
81+
Compress-Archive -Path "upload/${{ matrix.filename }}-NUI.exe" -DestinationPath "upload/${{ matrix.filename }}-NUI.zip"
82+
83+
- name: Upload to GitHub Release
84+
uses: softprops/action-gh-release@v2
85+
with:
86+
files: upload/*.zip
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

0 commit comments

Comments
 (0)