Skip to content

Commit

Permalink
Merge pull request #11 from Tranquility2/new_release
Browse files Browse the repository at this point in the history
New release flow
  • Loading branch information
Tranquility2 authored Apr 20, 2024
2 parents 651e245 + 26473ff commit 7a45654
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions xls_updater/__about__.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 7a45654

Please sign in to comment.