Skip to content

Commit d06e60a

Browse files
committed
feat: add workflow_dispatch trigger for manual release
1 parent a66a72a commit d06e60a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: build, test and release sqlite-sync
22
on:
33
push:
4+
workflow_dispatch:
45

56
permissions:
67
contents: write
@@ -165,7 +166,7 @@ jobs:
165166
VERSION=$(grep -oP '#define CLOUDSYNC_VERSION\s+"\K[^"]+' "$FILE")
166167
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
167168
LATEST=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.name')
168-
if [[ "$VERSION" != "$LATEST" ]]; then
169+
if [[ "$VERSION" != "$LATEST" || "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then
169170
echo "version=$VERSION" >> $GITHUB_OUTPUT
170171
else
171172
echo "::warning file=src/cloudsync.h::To release a new version, please update the CLOUDSYNC_VERSION in src/cloudsync.h to be different than the latest $LATEST"

0 commit comments

Comments
 (0)