add expo-updates github action (#3270)

* add expo-updates github action

* add two scripts
This commit is contained in:
Hailey 2024-03-19 11:18:22 -07:00 committed by GitHub
parent a02d5f9eb9
commit 9277282e6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 206 additions and 1 deletions

26
scripts/bundleUpdate.sh Normal file
View file

@ -0,0 +1,26 @@
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
rm -rf bundleTempDir
rm -rf bundle.tar.gz
echo "Creating tarball..."
node scripts/bundleUpdate.js
cd bundleTempDir || exit
BUNDLE_VERSION=$(date +%s)
DEPLOYMENT_URL="https://updates.bsky.app/v1/upload?runtime-version=$RUNTIME_VERSION&bundle-version=$BUNDLE_VERSION"
tar czvf bundle.tar.gz ./*
echo "Deploying to $DEPLOYMENT_URL..."
curl -o - --form "bundle=@./bundle.tar.gz" --user "bsky:$DENIS_API_KEY" --basic "$DEPLOYMENT_URL"
cd ..
rm -rf bundleTempDir
rm -rf bundle.tar.gz