Skip to content

Commit

Permalink
make step conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
brainelectronics committed Oct 12, 2024
1 parent 5ea693b commit afdeb85
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,14 @@ jobs:
--debug
echo "CHANGELOG_JSON=$(jq -c . < changelog.json)" >> $GITHUB_ENV
- name: Check JSON content
# if: ${{ fromJson(env.CHANGELOG_JSON).info.meta.type == 'bugfix' }}
if: ${{ fromJson(env.CHANGELOG_JSON).info.meta.type == 'bugfix' }}
run: |
echo "this was a bugfix change"
echo "CHANGELOG_JSON: $CHANGELOG_JSON"
echo "info meta type fromJson: START${{ fromJson(env.CHANGELOG_JSON).info.meta.type }}END"
# works, prints "bugfix"
echo "$CHANGELOG_JSON" | jq ".info.meta.type"
# works, prints "bugfix"
- name: Parse changelog JSON 2
id: parse_changelog_json_2
run: |
value=$(poetry run changelog2version --changelog_file changelog.md --print)
echo "CHANGELOG_JSON_STDOUT=$value" >> $GITHUB_OUTPUT
- name: Check JSON content 2
run: |
echo "Read output: ${{ steps.parse_changelog_json_2.outputs.CHANGELOG_JSON_STDOUT }}"
echo "meta type fromJson: START${{ fromJSON(steps.parse_changelog_json_2.outputs.CHANGELOG_JSON_STDOUT).info.meta.type }}END"
- name: Build package
run: |
poetry run changelog2version \
Expand Down

0 comments on commit afdeb85

Please sign in to comment.