Skip to content

Commit

Permalink
Create test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
EscapeAltDelete authored Jun 20, 2024
1 parent 8a35c22 commit 4e5d04a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update YTLitePlus
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
- uses: houqp/download-release-assets@v1
with:
repo: YTLitePlus/YTLitePlus
match: ".*YTLitePlus.*"
token: ${{ secrets.MY_GITHUB_TOKEN }}
- run: |
FILE_NAME=$(ls | grep 'YTLitePlus.*')
JSON=$(curl -sH "Authorization: Bearer ${{ secrets.MY_GITHUB_TOKEN }}" https://api.github.com/repos/EscapeAltDelete/Updater/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/Updater/releases/$RID &
DELETE_PID=$!
wait $DELETE_PID
- uses: ncipollo/release-action@main
with:
tag: YTLitePlus
name: YTLitePlus
body: "Latest release of YTLitePlus"
token: ${{ secrets.MY_GITHUB_TOKEN }}
artifacts: ${{ env.FILE_NAME }}

0 comments on commit 4e5d04a

Please sign in to comment.