+36
@@ -0,0 +1,36 @@
|
||||
name: mpy-publish
|
||||
description: "publishes an mpy version of the latest version tag to a generic repository"
|
||||
author: "Bryce Thorup"
|
||||
inputs:
|
||||
pypi_repo_user:
|
||||
description: Username used for authenticating with repo
|
||||
required: true
|
||||
pypi_repo_pass:
|
||||
description: Password used for authenticating with repo
|
||||
required: true
|
||||
pypi_repo_domain:
|
||||
description: Domain for pypi repo
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Update apt
|
||||
run: apt update
|
||||
|
||||
- name: Install pipx
|
||||
run: apt install pipx
|
||||
|
||||
- name: Install mpy-cross
|
||||
run: pipx install mpy-cross
|
||||
|
||||
- name: make "dist" dir
|
||||
run: mkdir dist
|
||||
|
||||
- name: Compile py files to mpy
|
||||
run: for f in ./*.py; do pipx run mpy-cross "$f" -o dist/test/$(basename "$f" .py).mpy; done
|
||||
|
||||
- name: Build project
|
||||
run: source .venv/bin/activate && python -m build
|
||||
|
||||
- name: Publish package
|
||||
run: source .venv/bin/activate && python -m twine upload --repository repo ./dist/*
|
||||
Reference in New Issue
Block a user