Compare commits

..

No commits in common. "76d2d55af85d41b8036c60322da5bec7e473e74f" and "1f01bda2f464be6446626a721cd438f8caca7a44" have entirely different histories.

2 changed files with 18 additions and 17 deletions

View File

@ -26,6 +26,9 @@ jobs:
python -m pip install flake8 python -m pip install flake8
python -m pip install ${{ matrix.click-version }} python -m pip install ${{ matrix.click-version }}
- name: Install module
run: python -m pip install .
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
@ -33,20 +36,13 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install module - name: Run unit tests
run: python -m pip install .
- name: Run Unit Tests
run: python -m unittest -v run: python -m unittest -v
- name: Run Action
id: yaclog-show
uses: ./
deploy: deploy:
needs: test # needs: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -1,10 +1,8 @@
name: Yaclog name: 'Yaclog'
description: > description: 'Get version information from a changelog, and optionally create a new release'
Get version information from a changelog, and optionally create a new release.
The `yaclog` command is made available for use in future steps.
branding: branding:
icon: file-text icon: file-text
color: orange color: blue
inputs: inputs:
markdown: markdown:
@ -46,12 +44,19 @@ runs:
- id: setup-python - id: setup-python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.12' python-version: '3.10'
update-environment: 'false' update-environment: 'false'
- name: Setup Yaclog - name: Setup Yaclog
shell: bash shell: bash
run: pipx install --python ${{ steps.setup-python.outputs.python-path }} ${{ github.action_path }} run: |
${{ steps.setup-python.outputs.python-path }} -m pip install ${{ github.action_path }}
# now make it available in $PATH
# this whole rigamarole is because we are using a python root that isnt in $PATH as to not step over other actions
mkdir -p "$GITHUB_ACTION_PATH/bin"
echo '${{ steps.setup-python.outputs.python-path }} -m yaclog.cli $@' > "$GITHUB_ACTION_PATH/bin/yaclog"
chmod +x "$GITHUB_ACTION_PATH/bin/yaclog"
echo "$GITHUB_ACTION_PATH/bin" > "$GITHUB_PATH"
- name: Create New Release - name: Create New Release
shell: bash shell: bash