Skip to content

runs-on

runs-on #3

Workflow file for this run

---
name: Package
on: push
jobs:
Package For PIP:

Check failure on line 7 in .github/workflows/Package.yaml

View workflow run for this annotation

GitHub Actions / Package

Invalid workflow file

The workflow is not valid. .github/workflows/Package.yaml (Line: 7, Col: 3): The identifier 'Package For PIP' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
strategy:
matrix:
platform: [ubuntu-latest]
python: ['3.x']
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: "Echo Vars"
run: |
echo matrix.platform: ${{ matrix.platform }}
echo matrix.python: ${{ matrix.python }}
- name: Get Version Number
run: |
currversion=$(git rev-parse --abbrev-ref HEAD)
echo $currversion
if [[ "$currversion" =~ v[0-9]\. ]]; then
verparts=($(echo $currversion | tr "-" "\n"))
len=${#verparts[@]}
if [ $len -gt 1 ]; then
txtversion=${verparts[0]}-${verparts[1]}
else
txtversion=${verparts[0]}
fi
numver=$(echo $currversion | sed -E 's/v([^-]*)/\1/')
echo numver\: $numver
version=$numver
echo version\: $version
fi
- name: Update Version Number in python files
run: |
sed -i -e "s/version = \"[^\"]*\"/version = \"${version}\"/" $(find . -name "*.py")
sed -i -e "s/# Version .*/# Version ${version}/" $(find . -name "*.py")