Skip to content

Update YTLitePlus

Update YTLitePlus #173

Workflow file for this run

name: Update YTLitePlus
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up Node.js
uses: actions/setup-node@main
- name: Download YTLitePlus.ipa
run: |
JSON=$(curl -s "https://api.github.com/repos/YTLitePlus/YTLitePlus/releases/latest")
URL=$(echo "$JSON" | jq -r '.assets[] | select(.name | contains("YTLitePlus")) | .browser_download_url')
curl -L -o ./YTLitePlus.ipa "$URL"
- name: Delete old release
run: |
JSON=$(curl -sH "Authorization: Bearer ${{ secrets.MY_GITHUB_TOKEN }}" https://api.github.com/repos/EscapeAltDelete/YouTubeUpdater/releases/tags/YTLitePlus)
RID=$(echo $JSON | jq -r '.id')
curl -X DELETE -H 'Authorization: Bearer ${{ secrets.MY_GITHUB_TOKEN }}' https://api.github.com/repos/EscapeAltDelete/YouTubeUpdater/releases/$RID &
DELETE_PID=$!
wait $DOWNLOAD_PID $DELETE_PID
- name: Release YTLitePlus
uses: ncipollo/release-action@main
with:
tag: YTLitePlus
name: YTLitePlus
body: "Latest release of YTLitePlus"
token: ${{ secrets.MY_GITHUB_TOKEN }}
artifacts: "./YTLitePlus.ipa"