Publish mag CLI #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 }} |