Skip to content

fix: upload actions

fix: upload actions #5

name: build-binary-nuitka
on:
push:
branches:
- develop
- 'feature/**'
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- name: checkout
uses: actions/checkout@v3
- name: install python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: replace version
run: |
from pathlib import Path
version = [l for l in Path('pyproject.toml').read_text().splitlines() if 'version' in l][0].split(' ')[-1].strip('\"')
f = Path('src/ntfsdump/models/MetaData.py')
text = f.read_text().replace("get_version(name)", f"\'{version}\'")
f.write_text(text)
shell: python
- name: Install dependencies
run: |
pip install poetry
poetry config virtualenvs.in-project true
poetry install
- name: run python
run: |
poetry run ntfsdump -h
- name: build
run: |
pip install nuitka
poetry run python -m nuitka --standalone --onefile --follow-imports -o ntfsdump.exe --output-dir=dist --assume-yes-for-downloads src/ntfsdump/views/NtfsDumpView.py
- name: verify
run: |
dist/ntfsdump.exe -h
dist/ntfsdump.exe --version
- name: upload
uses: actions/upload-artifact@v3
with:
path: dist/ntfsdump.exe
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- name: checkout
uses: actions/checkout@v3
- name: install python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: replace version
run: |
from pathlib import Path
version = [l for l in Path('pyproject.toml').read_text().splitlines() if 'version' in l][0].split(' ')[-1].strip('\"')
f = Path('src/ntfsdump/models/MetaData.py')
text = f.read_text().replace("get_version(name)", f"\'{version}\'")
f.write_text(text)
shell: python
- name: Install dependencies
run: |
sudo apt install patchelf
pip install poetry
poetry install
- name: run python
run: |
poetry run ntfsdump -h
- name: build
run: |
pip install nuitka
poetry run python -m nuitka --standalone --onefile --follow-imports -o ntfsdump --output-dir=dist --assume-yes-for-downloads src/ntfsdump/views/NtfsDumpView.py
- name: verify
run: |
dist/ntfsdump -h
dist/ntfsdump --version
- name: upload
uses: actions/upload-artifact@v3
with:
path: dist/ntfsdump