Skip to content

Commit

Permalink
fix: version check and create issue on failure (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Jan 25, 2024
1 parent 51280f7 commit 2719561
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ jobs:
- name: Extract version
shell: bash
id: metadata
run: |
run: | # also call this step outside of $(...) to make sure the status code is propagated
${{ startsWith(matrix.os, 'windows') && 'choco install yq' || '' }}
yq '.package.version' Cargo.toml
echo "project-version=$(yq '.package.version' Cargo.toml)" >> $GITHUB_OUTPUT
- name: Assert version in release
Expand Down Expand Up @@ -193,3 +195,13 @@ jobs:
${{ steps.package.outputs.pkg-path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create issue on failure
if: startsWith(github.ref, 'refs/tags/v') && failure()
uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d
with:
token: ${{ github.token }}
title: GitHub release failed
body: |
Creating a release failed. Please check the logs for more information.
[Failed Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})

0 comments on commit 2719561

Please sign in to comment.