Skip to content

Commit

Permalink
Merge pull request #102 from LedgerHQ/fix/publish_workflow
Browse files Browse the repository at this point in the history
Fix/publish workflow
  • Loading branch information
yogh333 authored Dec 7, 2023
2 parents 649cd13 + b223f1c commit 59378de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: |
# Extract package name from the tag name
TAG_NAME="${{ github.ref }}"
PACKAGE_NAME=$(echo "$TAG_NAME" | cut -d'-' -f1)
PACKAGE_NAME=$(echo "$TAG_NAME" | cut -d'/' -f3 | cut -d'-' -f1)
PACKAGE_NAMES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[].name' | tr '\n' ' ')
Expand All @@ -82,11 +82,11 @@ jobs:
id: check-version
run: |
PACKAGE_NAME="${{ steps.determine-package.outputs.package }}"
TAG_VERSION=$(echo "${{ github.ref }}" | cut -d 'v' -f 2)
TAG_VERSION=$(echo "${{ github.ref }}" | rev | cut -d 'v' -f 1 | rev)
MANIFEST_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r --arg PACKAGE_NAME "$PACKAGE_NAME" '.packages[] | select(.name == $PACKAGE_NAME) | .version')
if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then
echo "Package version in manifest does not match tag version."
echo "Package version in manifest $MANIFEST_VERSION does not match tag version $TAG_VERSION."
exit 1
else
echo "Package version in manifest matches tag version."
Expand Down

0 comments on commit 59378de

Please sign in to comment.