Skip to content

Publish Plugins to PyPi (tested with PyPi provisioner & auto version increment) #15

Publish Plugins to PyPi (tested with PyPi provisioner & auto version increment)

Publish Plugins to PyPi (tested with PyPi provisioner & auto version increment) #15

Workflow file for this run

name: Publish Provisioner Plugins to PyPi (auto version increment)
on:
workflow_dispatch:
inputs:
plugin_to_publish:
type: choice
description: 'Select an plugin to publish to PyPi'
options:
- 'provisioner_examples_plugin'
- 'provisioner_installers_plugin'
- 'provisioner_single_board_plugin'
- 'all'
required: true
env:
PYPI_API_TOKEN: ${{ secrets.PROVISIONER_PYPI_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ACTION_PLUGIN_TO_PUBLISH: ${{ github.event.inputs.plugin_to_publish }}
POETRY_VERSION: "1.4.1"
jobs:
publis_to_pypi:
name: Publish provisioner plugins to PyPi
runs-on: ubuntu-latest
strategy:
matrix:
python: [ '3.10' ]
steps:
- name: Checkout ZachiNachshon/provisioner
uses: actions/checkout@v3
with:
repository: 'ZachiNachshon/provisioner'
token: ${{ secrets.PROVISIONER_REPO_ACCESS_TOKEN }}
ref: fix-github-actions
- name: Checkout ZachiNachshon/provisioner-plugins
uses: actions/checkout@v3
with:
path: './plugins'
ref: fix-github-actions
- name: Setup Environment
uses: ./.github/actions/setup
env:
PYTHON_VERSION: ${{ matrix.python }}
POETRY_VERSION: ${{ env.POETRY_VERSION }}
- name: Install Required pip packages
run: |
pip install coverage twine
- name: Run Tests
uses: ./.github/actions/tests
with:
use_provisioner_from: pypi
module_to_test: ${{ github.event.inputs.plugin_to_publish }}
- name: Publish to PyPi
uses: ./.github/actions/publish
with:
publishable: ${{ github.event.inputs.plugin_to_publish }}
is_plugin: true
PYPI_API_TOKEN: ${{ env.PYPI_API_TOKEN }}