Skip to content

Commit 3c28c4b

Browse files
authored
Merge pull request #252 from BitGo/WCN-1101-ghcr-fix
fix: github action variable never set
2 parents cedbbfd + 23d111e commit 3c28c4b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release-to-ghcr.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ jobs:
3838

3939
- name: Release
4040
id: release
41-
run: npx semantic-release
41+
run: |
42+
set -euo pipefail
43+
npx semantic-release 2>&1 | tee /tmp/sr-output.txt
44+
if grep -q "Published release" /tmp/sr-output.txt; then
45+
VERSION=$(grep -oP '(?<=Published release )\S+' /tmp/sr-output.txt | head -1)
46+
echo "new_release_published=true" >> $GITHUB_OUTPUT
47+
echo "new_release_version=$VERSION" >> $GITHUB_OUTPUT
48+
else
49+
echo "new_release_published=false" >> $GITHUB_OUTPUT
50+
fi
4251
env:
4352
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4453

0 commit comments

Comments
 (0)