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

Commit 811af6f

Browse files
authored
Fix: previous version detection in release automation (#221)
1 parent 3164fef commit 811af6f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- name: Extract version
1818
id: version
1919
run: |
20-
OLD_VERSION=$(npm show @gnosis.pm/safe-react-components version)
21-
NEW_VERSION=$(node -p 'require("./package.json").version')
20+
OLD_VERSION=$(git describe --tags --abbrev=0)
21+
NEW_VERSION=v$(node -p 'require("./package.json").version')
2222
if [ $NEW_VERSION != $OLD_VERSION ]; then
2323
echo "New version $NEW_VERSION detected"
24-
echo "::set-output name=version::v$NEW_VERSION"
25-
git log "v$OLD_VERSION"..HEAD --pretty=format:"* %s" > CHANGELOG.md
24+
echo "::set-output name=version::$NEW_VERSION"
25+
git log "$OLD_VERSION"..HEAD --pretty=format:"* %s" > CHANGELOG.md
2626
else
2727
echo "Version $OLD_VERSION hasn't changed, skipping the release"
2828
exit 1

0 commit comments

Comments
 (0)