diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6478d2f..43c4f2a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,16 +3,6 @@ name: Publish on: workflow_dispatch: inputs: - bump_type: - required: true - description: Bump Type - type: choice - options: - - prerelease - - patch - - minor - - major - default: patch release: required: true description: Create Github Release @@ -49,20 +39,12 @@ jobs: python -m pip install --upgrade pip python -m pip install '.[release]' - - name: setup git config - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Bump Version - id: bump_version - env: - BUMP_TYPE: ${{ github.event.inputs.bump_type }} + - name: Check Version + id: get_version run: | - echo "Bumping type: ${{ env.BUMP_TYPE }}" - new_version=$(python -m semvergit -v -t ${{ env.BUMP_TYPE }} -f xls_updater/__about__.py) - git push origin master - echo "new_version=$new_version" >> $GITHUB_OUTPUT + get_version=$(git describe --tags --abbrev=0) + echo "Got Version: $get_version" + echo "get_version=$get_version" >> $GITHUB_OUTPUT - name: Download Binary Artifact uses: actions/download-artifact@v4 @@ -75,9 +57,9 @@ jobs: id: create_release uses: softprops/action-gh-release@v2 with: - name: ${{ steps.bump_version.outputs.new_version }} - tag_name: ${{ steps.bump_version.outputs.new_version }} - body: New Release ${{ steps.bump_version.outputs.new_version }} + name: ${{ steps.bump_version.outputs.get_version }} + tag_name: ${{ steps.bump_version.outputs.get_version }} + body: New Release ${{ steps.bump_version.outputs.get_version }} token: ${{ secrets.GITHUB_TOKEN }} files: | artifact/xls_updater diff --git a/Makefile b/Makefile index 7e16135..49205ce 100644 --- a/Makefile +++ b/Makefile @@ -52,3 +52,6 @@ compile: python3 -m piptools compile -o requirements/requirements.txt pyproject.toml python3 -m piptools compile -o requirements/requirements-dev.txt --extra dev pyproject.toml python3 -m piptools compile -o requirements/requirements-test.txt --extra test pyproject.toml + +patch: + python3 -m semvergit -v -t patch -f xls_updater/__about__.py diff --git a/xls_updater/__about__.py b/xls_updater/__about__.py index e640b24..bf8d21c 100644 --- a/xls_updater/__about__.py +++ b/xls_updater/__about__.py @@ -1,3 +1,3 @@ -"""Version of the package.""" +"""Version of the package - This file is generated by semvergit""" -__version__ = "0.1.12" +__version__ = "0.2.1"