Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix: previous version detection in release automation #221

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
- name: Extract version
id: version
run: |
OLD_VERSION=$(npm show @gnosis.pm/safe-react-components version)
NEW_VERSION=$(node -p 'require("./package.json").version')
OLD_VERSION=$(git describe --tags --abbrev=0)
NEW_VERSION=v$(node -p 'require("./package.json").version')
if [ $NEW_VERSION != $OLD_VERSION ]; then
echo "New version $NEW_VERSION detected"
echo "::set-output name=version::v$NEW_VERSION"
git log "v$OLD_VERSION"..HEAD --pretty=format:"* %s" > CHANGELOG.md
echo "::set-output name=version::$NEW_VERSION"
git log "$OLD_VERSION"..HEAD --pretty=format:"* %s" > CHANGELOG.md
else
echo "Version $OLD_VERSION hasn't changed, skipping the release"
exit 1
Expand Down