Skip to content

Commit

Permalink
Merge set package version action with build action
Browse files Browse the repository at this point in the history
  • Loading branch information
itskalvik committed Dec 6, 2024
1 parent f39ea40 commit 92d0df9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pypi-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,24 @@ on:
release:
types: [released]

permissions:
contents: write

jobs:
set-package-version:
name: Set python version
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Set package version
run: sed -i "s/__version__ = .*/$(grep "__version__ = " setup.py)/" sgptools/__init__.py

- name: Commit the changed file back to the repository
uses: stefanzweifel/git-auto-commit-action@v5

build:
name: Build distribution 📦
runs-on: ubuntu-latest
Expand All @@ -13,6 +30,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set package version
run: |
sed -i "s/__version__ = .*/$(grep "__version__ = " setup.py)/" sgptools/__init__.py
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/version.yml

This file was deleted.

2 changes: 1 addition & 1 deletion sgptools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""

__version__ = "1.1.3"
__version__ = "1.1.2"
__author__ = 'Kalvik'

from .models.core import *
Expand Down

0 comments on commit 92d0df9

Please sign in to comment.