Skip to content

refactor(file_toolkit): enhance progress display and streamline main … #36

refactor(file_toolkit): enhance progress display and streamline main …

refactor(file_toolkit): enhance progress display and streamline main … #36

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
version:
description: 'Version'
required: false
default: ''
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ github.event.inputs.version }}" ]]; then
VERSION_TAG="${{ github.event.inputs.version }}"
echo "Using manually provided version: $VERSION_TAG"
else
VERSION_TAG=$(git describe --tags --always)
echo "Extracted version from git: $VERSION_TAG"
fi
echo "$VERSION_TAG" > VERSION
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build the package
run: |
python -m build
- name: Publish
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine upload dist/*