From c1a10834ef87d8a5e351ebc0f62000522109db82 Mon Sep 17 00:00:00 2001 From: sumeshi Date: Sun, 27 Mar 2022 04:10:03 +0900 Subject: [PATCH] fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings fix: ci settings --- .github/workflows/build-binary.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-binary.yaml b/.github/workflows/build-binary.yaml index 2c415a0..e9f6561 100644 --- a/.github/workflows/build-binary.yaml +++ b/.github/workflows/build-binary.yaml @@ -1,11 +1,8 @@ name: build-binary on: - push: - branches: - - develop - # release: - # types: [published] + release: + types: [published] jobs: build-windows: @@ -23,21 +20,24 @@ jobs: python-version: ${{ matrix.python-version }} - name: replace version - run: cat pyproject.toml | grep version | sed 's/.*\ //g' | xargs -I@ sed -i 's/version(name)/"@"/g' src/ntfsdump/models/MetaData.py - - - name: touch init files run: | - touch src/ntfsdump/models/__init__.py - touch src/ntfsdump/presenters/__init__.py - touch src/ntfsdump/views/__init__.py + 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("version(name)", f"\'{version}\'") + f.write_text(text) + shell: python - - name: setup poetry + - name: Install dependencies run: | pip install poetry poetry config virtualenvs.in-project true - poetry install --no-interaction poetry install + - name: run python + run: | + poetry run ntfsdump -h + - name: build run: | pip install pyinstaller