Skip to content

update action steps #109

update action steps

update action steps #109

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Release Binary
on:
push:
branches: [ develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12.4
- name: Install Poetry
uses: snok/install-poetry@v1
- run: |
poetry install --no-root
poetry build
poetry run pip install --no-index --find-links=dist nutcracker
mv dist dist_old
poetry run pyinstaller --onefile -n nutcracker src/nutcracker/runner.py
# Optionally verify that it works (provided that it does not need user interaction)
- run: ./dist/nutcracker --help
- run: |
if [ "$RUNNER_OS" == "Linux" ]; then
mv ./dist/nutcracker ./dist/nutcracker-linux
elif [ "$RUNNER_OS" == "macOS" ]; then
mv ./dist/nutcracker ./dist/nutcracker-macos
else
cp README.md ./dist/README.md
poetry run pip-licenses --from=all --format=plain-vertical --with-license-file --no-license-path --with-urls --with-description --output-file ./dist/LICENSE
fi
- uses: actions/upload-artifact@v4
with:
name: nutcracker-${{ matrix.os }}
path: dist/*
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: nutcracker
pattern: nutcracker-*