├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── README.md └── banner.webp /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Publish Release, Upload to S3, and Notify Slack 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | release-and-notify: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v2 12 | 13 | - name: Publish Latest Draft Release 14 | uses: actions/github-script@v5 15 | with: 16 | script: | 17 | const { data: releases } = await github.rest.repos.listReleases({ 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | }); 21 | const draftRelease = releases.find(release => release.draft === true); 22 | if (!draftRelease) { 23 | throw new Error("No draft release found"); 24 | } 25 | const { data: publishedRelease } = await github.rest.repos.updateRelease({ 26 | owner: context.repo.owner, 27 | repo: context.repo.repo, 28 | release_id: draftRelease.id, 29 | draft: false, 30 | }); 31 | core.setOutput("body", publishedRelease.body); 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | id: publish_release 35 | 36 | - name: Download Release Assets (.exe, .deb, .rpm) and Track Them 37 | run: | 38 | mkdir -p ./deploy 39 | # Clear or create the downloaded_files.txt file 40 | > ./deploy/downloaded_files.txt 41 | 42 | ASSETS_URLS=$(curl -s \ 43 | -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ 44 | -H "Accept: application/vnd.github.v3+json" \ 45 | https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.assets[] | .browser_download_url' | grep -E '\.(exe|deb|rpm)$') 46 | 47 | echo "$ASSETS_URLS" | while read url; do 48 | filename=$(basename "$url") 49 | curl -L -o "./deploy/${filename}" "$url" && echo "${filename}" >> ./deploy/downloaded_files.txt 50 | done 51 | 52 | - name: Upload Downloaded Assets to AWS S3 53 | run: | 54 | while read filename; do 55 | file="./deploy/${filename}" 56 | if [ -f "$file" ]; then 57 | if [[ "$file" == *.exe ]]; then 58 | s3_path="s3://${{ secrets.S3_BUCKET_NAME }}/pro/production/windows/download/${filename}" 59 | elif [[ "$file" == *.deb ]] || [[ "$file" == *.rpm ]]; then 60 | s3_path="s3://${{ secrets.S3_BUCKET_NAME }}/pro/production/linux/download/${filename}" 61 | fi 62 | aws s3 cp "$file" "$s3_path" 63 | fi 64 | done < ./deploy/downloaded_files.txt 65 | env: 66 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 67 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 68 | AWS_REGION: "us-west-2" 69 | 70 | - name: Send Release Note to Slack 71 | env: 72 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 73 | run: | 74 | PAYLOAD=$(echo ":white_check_mark: [Pro] Publishing Electron Complete\nversion: ${filename}\nplatform: - \n" | jq -R -s '{text: .}') 75 | curl -X POST -H 'Content-type: application/json' --data "$PAYLOAD" $SLACK_WEBHOOK_URL 76 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | yarn.lock 3 | */.next/ 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwitchLight is now [Beeble](https://beeble.ai) 2 | 🚀 **Experience 10x faster, better video relighting at → [beeble.ai](https://beeble.ai)** 3 | ![Beeble Banner](./banner.webp) 4 | 5 | -------------------------------------------------------------------------------- /banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beeble-ai/SwitchLight-Studio/4d0287c254bdf402c93ad6d6cf81a6a317af3f18/banner.webp --------------------------------------------------------------------------------