88 branches :
99 - main
1010 paths :
11- - ' lib/metric-config-parser/*.yaml '
11+ - ' lib/metric-config-parser/pyproject.toml '
1212
1313permissions :
1414 contents : read
@@ -18,22 +18,25 @@ jobs:
1818 uses : ./.github/workflows/changed-files.yml
1919 with :
2020 path_filter : |
21- lib/metric-config-parser/*.yaml
21+ lib/metric-config-parser/pyproject.toml
2222
2323 check-version-change :
2424 runs-on : ubuntu-latest
2525 needs : changed
26+ permissions :
27+ contents : read
2628 outputs :
2729 proceed : ${{ steps.version_change.outputs.proceed }}
2830 if : needs.changed.outputs.any_changed == 'true'
2931 steps :
3032 - name : Checkout
31- uses : actions/checkout@v4
33+ uses : actions/checkout@v5
34+ with :
35+ fetch-depth : 0
3236 - id : version_change
3337 name : Check for package version change in last commit before proceeding.
34- working-directory : ~/project/lib/metric-config-parser
3538 run : |
36- if git diff main HEAD~1 pyproject.toml | grep 'version'
39+ if git diff origin/ main HEAD~1 -- ./lib/metric-config-parser/ pyproject.toml | grep '\+ version'
3740 then
3841 echo "Found changes to package version dir, proceeding with deployment."
3942 echo "proceed=true" >> "GITHUB_OUTPUT"
@@ -50,27 +53,25 @@ jobs:
5053 if : needs.check-version-change.outputs.proceed == 'true'
5154 steps :
5255 - name : Checkout
53- uses : actions/checkout@v4
54- with :
55- path : ~/project
56+ uses : actions/checkout@v5
5657 - name : Setup python
5758 uses : actions/setup-python@v5
5859 with :
5960 python-version : " 3.10"
6061 cache : ' pip'
6162 - name : Install deployment tools
62- working-directory : ~/project /lib/metric-config-parser
63+ working-directory : . /lib/metric-config-parser
6364 run : |
6465 python3 -m pip install --upgrade pip build setuptools wheel
6566 - name : Create the distribution files
66- working-directory : ~/project /lib/metric-config-parser
67+ working-directory : . /lib/metric-config-parser
6768 run : |
6869 python3.10 -m build --sdist
6970 - name : Upload distribution
7071 uses : actions/upload-artifact@v4
7172 with :
7273 name : release-dist
73- path : ~/project /lib/metric-config-parser/dist
74+ path : . /lib/metric-config-parser/dist
7475
7576 deploy-metric-config-parser :
7677 runs-on : ubuntu-latest
0 commit comments