Skip to content

Commit

Permalink
Merge pull request #15 from lpm0073/next
Browse files Browse the repository at this point in the history
refactor versionBump.yml to remove deprecated set-output
  • Loading branch information
lpm0073 authored Nov 14, 2023
2 parents 27f4046 + fbac0d2 commit cf30611
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/versionBump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,29 @@
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: null step
id: null_step
run: echo "i ensure that NEXT_VERSION is set."

- name: Check versions
id: check_versions
run: |
if [ "$CURRENT_VERSION" != "$NEXT_VERSION" ]; then
echo "::set-output name=version_changed::true"
echo "VERSION_CHANGED=true" >> $GITHUB_ENV
else
echo "::set-output name=version_changed::false"
echo "VERSION_CHANGED=false" >> $GITHUB_ENV
fi
env:
CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
NEXT_VERSION: ${{ env.NEXT_VERSION }}

- name: another null step
id: another_null_step
run: echo "i ensure that CURRENT_VERSION, NEXT_VERSION and VERSION_CHANGED are set."


- name: Update __version__
if: steps.check_versions.outputs.version_changed == 'true'
if: env.VERSION_CHANGED == 'true'
id: update_version
run: |
echo "__version__ = '${{ env.NEXT_VERSION }}'" > __version__.py
Expand All @@ -67,5 +76,5 @@
git push https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
NEXT_VERSION: ${{ env.NEXT_VERSION }}
VERSION_CHANGED: ${{ env.VERSION_CHANGED }}
2 changes: 1 addition & 1 deletion __version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.10'
__version__ = '0.1.11'

0 comments on commit cf30611

Please sign in to comment.