Skip to content

Commit 4cfb580

Browse files
committed
chore: Add EAS Update auto-publish and Expo Go QR code
- Add eas.json and a GitHub workflow that publishes the Expo example as an EAS Update on push to main (requires an EXPO_TOKEN repository secret). - Add expo-haptics to the Expo example so haptics work in Expo Go. - Add an "Open in Expo Go" QR code to the README and docs.
1 parent 9b89101 commit 4cfb580

7 files changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 📲 Publish Expo example
2+
3+
# Publishes the Expo example app as an EAS Update so it can be opened in
4+
# Expo Go via the QR code in the README / docs. Requires an EXPO_TOKEN
5+
# repository secret (create a free token at https://expo.dev/settings/access-tokens).
6+
7+
on:
8+
push:
9+
branches: [main]
10+
paths:
11+
- 'example/expo/**'
12+
- 'packages/react-native-sortables/src/**'
13+
- '.github/workflows/publish-expo-example.yml'
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: publish-expo-example
18+
cancel-in-progress: true
19+
20+
jobs:
21+
publish:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: 🛒 Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: 🔧 Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: 'yarn'
33+
34+
- name: 🚀 Setup EAS
35+
uses: expo/expo-github-action@v8
36+
with:
37+
eas-version: latest
38+
token: ${{ secrets.EXPO_TOKEN }}
39+
40+
- name: 📦 Install dependencies
41+
run: yarn install --immutable
42+
43+
- name: 📲 Publish EAS Update
44+
working-directory: example/expo
45+
run: eas update --channel production --message "${UPDATE_MESSAGE:-Manual publish}" --environment production --non-interactive
46+
env:
47+
UPDATE_MESSAGE: ${{ github.event.head_commit.message }}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626

2727
React Native Sortables is a powerful and easy-to-use library that brings smooth, intuitive content reordering to React Native. It provides specialized components whose children can be dynamically reordered through natural dragging gestures.
2828

29+
## Try it in Expo Go
30+
31+
Install [Expo Go](https://expo.dev/go) and scan the QR code below to open the example app on your device:
32+
33+
<p align="center">
34+
<img src="https://raw.githubusercontent.com/MatiPl01/react-native-sortables/main/packages/docs/static/img/expo-go-qr.png" width="200" alt="Open the example app in Expo Go" />
35+
</p>
36+
2937
## Key Features
3038

3139
- 🎯 **Flexible Layouts**

example/expo/eas.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"cli": {
3+
"version": ">= 12.0.0",
4+
"appVersionSource": "local"
5+
},
6+
"build": {
7+
"preview": {
8+
"channel": "preview"
9+
},
10+
"production": {
11+
"channel": "production"
12+
}
13+
},
14+
"submit": {
15+
"production": {}
16+
}
17+
}

example/expo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"dependencies": {
55
"expo": "56.0.9",
6+
"expo-haptics": "~56.0.3",
67
"expo-status-bar": "~56.0.4",
78
"expo-updates": "~56.0.18",
89
"react": "19.2.3",

packages/docs/docs/intro.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ import bannerVideo from '@site/static/video/banner.mp4';
1414

1515
**React Native Sortables** is a library for smooth **drag-and-drop reordering** of items. It offers ready-to-use **sortable components** with **intuitive gesture-based reordering**, working seamlessly across iOS and Android platforms.
1616

17+
## 📱 Try it in Expo Go
18+
19+
Install [Expo Go](https://expo.dev/go) and scan the QR code below to open the example app on your phone — no setup required:
20+
21+
<img src="/img/expo-go-qr.png" width="220" alt="Open the example app in Expo Go" />
22+
1723
## ⭐ Key Features
1824

1925
### 🎯 Flexible Layouts
777 Bytes
Loading

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8486,6 +8486,7 @@ __metadata:
84868486
"@babel/core": "npm:^7.25.2"
84878487
"@types/react": "npm:~19.2.0"
84888488
expo: "npm:56.0.9"
8489+
expo-haptics: "npm:~56.0.3"
84898490
expo-status-bar: "npm:~56.0.4"
84908491
expo-updates: "npm:~56.0.18"
84918492
react: "npm:19.2.3"
@@ -8680,6 +8681,15 @@ __metadata:
86808681
languageName: node
86818682
linkType: hard
86828683

8684+
"expo-haptics@npm:~56.0.3":
8685+
version: 56.0.3
8686+
resolution: "expo-haptics@npm:56.0.3"
8687+
peerDependencies:
8688+
expo: "*"
8689+
checksum: 10c0/f6d37336ad5c75e9906c42e7c73aa7540cb63f5364971f5f133adab16ad50d98ac04ae017a1ddd279bf5d32acc19208755c4918edabce0b9b83bbb38ffffba6d
8690+
languageName: node
8691+
linkType: hard
8692+
86838693
"expo-json-utils@npm:~56.0.0":
86848694
version: 56.0.0
86858695
resolution: "expo-json-utils@npm:56.0.0"

0 commit comments

Comments
 (0)