Skip to content

Commit 8a17ba9

Browse files
committed
fix(workflow): move Package.swift checksum and version update after the release packages steps
1 parent c72ddc2 commit 8a17ba9

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -369,22 +369,6 @@ jobs:
369369
fi
370370
done
371371
372-
- name: update Package.swift checksum and version
373-
run: |
374-
VERSION=$(make version)
375-
ZIP="cloudsync-apple-xcframework-${VERSION}.zip"
376-
if [ -f "$ZIP" ]; then
377-
CHECKSUM=$(swift package compute-checksum "$ZIP")
378-
URL="https://github.com/sqliteai/sqlite-sync/releases/download/${VERSION}/${ZIP}"
379-
sed -i "s|url: \".*cloudsync-apple-xcframework.*\"|url: \"${URL}\"|" Package.swift
380-
sed -i "s|checksum: \".*\"|checksum: \"${CHECKSUM}\"|" Package.swift
381-
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
382-
git config --global user.name "$GITHUB_ACTOR"
383-
git add Package.swift
384-
git commit -m "Update Package.swift checksum for ${VERSION} [skip ci]" || true
385-
git push origin main || true
386-
fi
387-
388372
- name: release tag version from cloudsync.h
389373
id: tag
390374
run: |
@@ -527,6 +511,23 @@ jobs:
527511
npm publish --provenance --access public --tag latest
528512
echo "✓ Published @sqliteai/sqlite-sync-expo@${{ steps.tag.outputs.version }}"
529513
514+
- name: update Package.swift checksum and version
515+
if: steps.tag.outputs.version != ''
516+
run: |
517+
VERSION=${{ steps.tag.outputs.version }}
518+
ZIP="cloudsync-apple-xcframework-${VERSION}.zip"
519+
if [ -f "$ZIP" ]; then
520+
CHECKSUM=$(swift package compute-checksum "$ZIP")
521+
URL="https://github.com/sqliteai/sqlite-sync/releases/download/${VERSION}/${ZIP}"
522+
sed -i "s|url: \".*cloudsync-apple-xcframework.*\"|url: \"${URL}\"|" Package.swift
523+
sed -i "s|checksum: \".*\"|checksum: \"${CHECKSUM}\"|" Package.swift
524+
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
525+
git config --global user.name "$GITHUB_ACTOR"
526+
git add Package.swift
527+
git commit -m "Update Package.swift checksum for ${VERSION} [skip ci]" || true
528+
git push origin main || true
529+
fi
530+
530531
- uses: softprops/action-gh-release@v2.2.1
531532
if: steps.tag.outputs.version != ''
532533
with:

src/cloudsync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
extern "C" {
1919
#endif
2020

21-
#define CLOUDSYNC_VERSION "1.0.1"
21+
#define CLOUDSYNC_VERSION "1.0.2"
2222
#define CLOUDSYNC_MAX_TABLENAME_LEN 512
2323

2424
#define CLOUDSYNC_VALUE_NOTSET -1

0 commit comments

Comments
 (0)