Skip to content

Commit

Permalink
feat: add a function logs_file that specifies a file to write logs to
Browse files Browse the repository at this point in the history
  • Loading branch information
Mcdostone committed Jan 17, 2025
1 parent 60ab20e commit ec8d511
Show file tree
Hide file tree
Showing 19 changed files with 627 additions and 145 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/semver-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,29 @@ jobs:
exit 1
env:
GH_TOKEN: ${{ github.token }}

- name: Show release type
id: semver
run: |
wget -O semver "https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver"
chmod u+x ./semver
echo "release=$(./semver diff ${{ steps.current.outputs.version }} ${{ steps.next.outputs.version }})" >> "$GITHUB_OUTPUT"
chmod u+x ./.github/workflows/semver.sh
echo "release=$(./.github/workflows/semver.sh diff ${{ steps.current.outputs.version }} ${{ steps.next.outputs.version }})" >> "$GITHUB_OUTPUT"
- name: Prepare report.md
if: ${{ steps.next.outputs.version == '' }}
run: |
{
echo "> [!WARNING]"
echo "> According to \`cargo-semver-checks\`, the next release version doesn\'t respect semantic versioning."
echo '```bash'
printf "> [!WARNING]"
printf "> According to \`cargo-semver-checks\`, the next release version doesn\'t respect semantic versioning."
printf '```bash'
} > ./report.md
- name: Run cargo semver-checks
if: ${{ steps.next.outputs.version != '' && steps.semver.outputs.release != '' }}
id: check
run: cargo semver-checks --color never --package yozefu-lib --package yozefu-app --package yozefu-wasm-types --package yozefu-command --baseline-rev "${{ steps.current.outputs.version }}" --release-type "${{ steps.semver.outputs.release }}" >> "$GITHUB_OUTPUT"
run: cargo semver-checks --color never --package yozefu-lib --package yozefu-app --package yozefu-wasm-types --package yozefu-command --baseline-rev "${{ steps.current.outputs.version }}" --release-type "${{ steps.semver.outputs.release }}"
continue-on-error: true
- name: Publish semver-checks report
if: ${{ steps.check.outcome != 'success' && steps.check.outcome != 'skipped' }}
if: ${{ steps.check.outcome != 'success' }}
run: |

Check failure on line 93 in .github/workflows/semver-checks.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1009:info:1:1: The mentioned syntax error was in this simple command

Check failure on line 93 in .github/workflows/semver-checks.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1073:error:1:8: Couldn't parse this double quoted string. Fix to allow more checks

Check failure on line 93 in .github/workflows/semver-checks.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1072:error:4:1: Expected end of double quoted string. Fix any mentioned problems and try again

Check failure on line 93 in .github/workflows/semver-checks.yml

View workflow job for this annotation

GitHub Actions / actionlint

got unexpected character '"' while lexing end marker }}, expecting '}'. do you mean string literals? only single quotes are available for string delimiter
echo "${{ steps.check.outputs.version }}" >> report.md
printf '\n```' >> ./report.md
printf "\`cargo-semver-checks\` has detected some issues: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }" > report.md
gh pr comment ${{ github.event.number }} --body-file ./report.md
exit 1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit ec8d511

Please sign in to comment.