Skip to content

Commit

Permalink
repalce tomlkit by toml
Browse files Browse the repository at this point in the history
  • Loading branch information
BeArchiTek committed Apr 24, 2024
1 parent 3d23e83 commit aa1261e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/trigger-push-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
run: |
commit_author=$(git log -1 --pretty=format:'%an')
commit_message=$(git log -1 --pretty=format:'%s')
if [[ "$commit_author" == "opsmill-bot" && "$commit_message" == "chore: update pyproject.toml & galaxy.yml" ]]; then
if [[ "$commit_author" == "opsmill-bot" && \
"$commit_message" == "chore: update pyproject.toml & galaxy.yml" ]]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -72,8 +73,14 @@ jobs:
- name: Update pyproject.toml and galaxy.yml versions
run: |
VERSION=${{ steps.version.outputs.next-version }}
python -c "\
import toml; \
with open('pyproject.toml', 'r') as file: \
data = toml.load(file); \
data['tool']['poetry']['version'] = '$VERSION'; \
with open('pyproject.toml', 'w') as file: \
toml.dump(data, file)"
sed -i "s/^version:.*/version: $VERSION/" galaxy.yml
python -c "import tomlkit; doc = tomlkit.loads(open('pyproject.toml', 'r').read()); doc['tool']['poetry']['version'] = '$VERSION'; open('pyproject.toml', 'w').write(tomlkit.dumps(doc))"
- name: Update lock file
run: poetry lock --no-update
Expand Down

0 comments on commit aa1261e

Please sign in to comment.