init
Push to main / Reset-Version-Tag (push) Successful in 5s

This commit is contained in:
2026-05-15 10:37:03 -06:00
commit ede0a96dae
3 changed files with 65 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
name: Push to main
on:
push:
branches: [main]
jobs:
Reset-Version-Tag:
runs-on: debian-bullseye
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: git tag -d v1 || true
- run: git push --delete origin v1 || true
- run: git tag v1
- run: git push --tags
+13
View File
@@ -0,0 +1,13 @@
NAME=$(basename "$PWD")
VER=$(cat version)
DIR_NAME="$NAME"_"$VER"
TAR_NAME="$DIR_NAME".tar.gz
FULL_URL="$INPUT_REPO_URL"/"$NAME"/"$VER"/"$TAR_NAME"
apt update
apt install -y pipx
pipx install mpy-cross
mkdir "$DIR_NAME"
for f in ./*.py; do pipx run mpy-cross "$f" -o "$DIR_NAME"/$(basename "$f" .py).mpy; done
tar czf "$TAR_NAME" "$DIR_NAME"
curl -u "$INPUT_REPO_USER":"$INPUT_REPO_PASS" -X PUT -T "$TAR_NAME" "$FULL_URL"
+36
View File
@@ -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/*