Skip to content

Commit cf0b85c

Browse files
committed
ci: install protoc for release builds
1 parent e4698fc commit cf0b85c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,21 @@ jobs:
4848
run: |
4949
VERSION=$(node -p "require('./package.json').version")
5050
TAG="v$VERSION"
51-
if git ls-remote --tags origin | grep -q "refs/tags/$TAG$"; then
51+
if git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
5252
echo "Tag $TAG already exists on remote"
5353
echo "tag=$TAG" >> $GITHUB_OUTPUT
5454
else
5555
git config user.name "github-actions[bot]"
5656
git config user.email "github-actions[bot]@users.noreply.github.com"
5757
git tag -f "$TAG"
58-
git push origin "$TAG"
58+
if git push origin "$TAG"; then
59+
echo "Pushed tag $TAG"
60+
elif git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
61+
echo "Tag $TAG was created by another process"
62+
else
63+
exit 1
64+
fi
5965
echo "tag=$TAG" >> $GITHUB_OUTPUT
60-
echo "Pushed tag $TAG"
6166
fi
6267
6368
build:
@@ -150,6 +155,8 @@ jobs:
150155
with:
151156
targets: ${{ matrix.target }}
152157

158+
- uses: arduino/setup-protoc@v3
159+
153160
- uses: Swatinem/rust-cache@v2
154161
with:
155162
workspaces: src-tauri

0 commit comments

Comments
 (0)