Skip to content

Publish mag CLI

Publish mag CLI #2

Workflow file for this run

#
# Publishes the magasin command line interface (mag CLI)
# within the python pypi registry
#
# After publishing the package it can be tested by
# running:
#
# pip install mag
# mag --version
#
name: Publish mag CLI
#on:
# release:
# types: [published]
on:
workflow_dispatch:
permissions:
contents: read
jobs:
release-to-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: |
cd mag-cli
python -m build
ls -la ./dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
packages_dir: mag-cli/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}