Skip to content

tweak commit batch size & more logging #205

tweak commit batch size & more logging

tweak commit batch size & more logging #205

Workflow file for this run

name: create apps
on:
push:
tags:
- '*'
defaults:
run:
shell: bash
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: pytest
run: |
source .venv/bin/activate
pytest --cov=./ezbeq --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.0.1
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: true
buildpypi:
name: Publish to Pypi
needs: create_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use node.js lts
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Setup node_modules
working-directory: ./ui
run: yarn install --frozen-lockfile
- name: Build UI
working-directory: ./ui
run: yarn build
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@v2
- name: Set version
run: |
echo ${{ steps.get_version.outputs.version-without-v }} > ezbeq/VERSION
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: Build dist
run: poetry build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: octokit/request-action@v2.x
with:
route: POST /repos/{owner}/{repo}/dispatches
owner: 3ll3d00d
repo: ezbeq-jr
event_type: 'trigger'
env:
GITHUB_TOKEN: ${{ secrets.EZBEQJR }}
buildpyinstaller:
name: Publish to Github
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Use node.js lts
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Setup node_modules
working-directory: ./ui
run: yarn install --frozen-lockfile
- name: Build UI
working-directory: ./ui
run: yarn build
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@v2
- name: Set version
run: |
echo ${{ steps.get_version.outputs.version-without-v }} > ezbeq/VERSION
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with exe --no-interaction --no-root
- name: Install project
run: poetry install --with exe --no-interaction
- name: Create distribution
id: create_dist
run: |
poetry run pyinstaller --clean --log-level=INFO ezbeq.spec
if [[ "$RUNNER_OS" == "macOS" ]]
then
pushd dist
rm ezbeq
zip -r ezbeq.app.zip ezbeq.app
rm -Rf ezbeq.app
popd
echo "binary_path=dist/ezbeq.app.zip" >> $GITHUB_OUTPUT
echo "binary_name=ezbeq.app.zip" >> $GITHUB_OUTPUT
echo "binary_content_type=application.zip" >> $GITHUB_OUTPUT
elif [[ "$RUNNER_OS" == "Windows" ]]
then
echo "binary_path=dist/ezbeq.exe" >> $GITHUB_OUTPUT
echo "binary_name=ezbeq.exe" >> $GITHUB_OUTPUT
echo "binary_content_type=application.vnd.microsoft.portable-executable" >> $GITHUB_OUTPUT
fi
- name: Upload asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: ${{ steps.create_dist.outputs.binary_name }}
asset_path: ${{ steps.create_dist.outputs.binary_path }}
asset_content_type: ${{ steps.create_dist.outputs.binary_content_type }}