Skip to content

Commit

Permalink
improve version update
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Jul 18, 2024
1 parent 96fea23 commit 9649f50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Update version.py
run: |
echo "__version__ = '${GITHUB_REF#refs/tags/v}'" > bacs/version.py
- name: set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -26,12 +22,14 @@ jobs:
- name: set up Poetry
uses: abatilo/actions-poetry@v2

- name: get version
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "VERSION=$(echo ${GITHUB_REF/refs\/tags\//})" >> $GITHUB_ENV

- name: set version
run: poetry version ${{ steps.get_version.outputs.VERSION }}
- name: Set version
run: |
VERSION=${{ env.VERSION }}
poetry version ${VERSION#v}
- name: publish
env:
Expand All @@ -49,9 +47,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Update version in pyproject.toml
run: python .github/workflows/update_pyproject.py $(echo ${GITHUB_REF/refs\/tags\//})

- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/update_pyproject.py

This file was deleted.

0 comments on commit 9649f50

Please sign in to comment.