Skip to content

Create a GitHub plugin release #9

Create a GitHub plugin release

Create a GitHub plugin release #9

Workflow file for this run

name: Create a GitHub plugin release
on:
workflow_dispatch:
inputs:
plugin_to_publish:
type: choice
description: 'Select plugin to add as GitHub release'
options:
- 'provisioner_examples_plugin'
- 'provisioner_installers_plugin'
- 'provisioner_single_board_plugin'
required: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ACTION_PLUGIN_TO_PUBLISH: ${{ github.event.inputs.plugin_to_publish }}
POETRY_VERSION: "1.4.1"
jobs:
publish_to_pypi:
name: Publish provisioner plugins as GitHub release
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 }}
- name: Checkout ZachiNachshon/provisioner-plugins
uses: actions/checkout@v3
with:
path: './plugins'
- name: Setup Environment
uses: ./.github/actions/setup
env:
PYTHON_VERSION: ${{ matrix.python }}
POETRY_VERSION: ${{ env.POETRY_VERSION }}
# Tests should be run when the PR created after publish to PyPi was merged
- name: Create a GitHub release
uses: ./.github/actions/release
with:
publishable: ${{ github.event.inputs.plugin_to_publish }}
is_plugin: true
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}