Skip to content

Weekly Roblox API Fetch #55

Weekly Roblox API Fetch

Weekly Roblox API Fetch #55

name: Weekly Roblox API Fetch
on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at 00:00 UTC
workflow_dispatch:
jobs:
fetch-and-release:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run fetch script
run: python script.py
- name: Locate generated dump
id: find_file
run: |
dump=$(ls version-*.json)
tag=${dump%.json}
echo "file=$dump" >> $GITHUB_OUTPUT
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Create or update GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.find_file.outputs.tag }}
name: ${{ steps.find_file.outputs.tag }}
body: |
Automated weekly Roblox API dump
Generated by workflow run ${{ github.run_id }}
artifacts: ${{ steps.find_file.outputs.file }}
token: ${{ secrets.RELEASE_TOKEN }}
- name: Mark as latest release
uses: ncipollo/release-action@v1
with:
tag: latest
name: Latest
body: |
This release always points to the latest API dump.
Generated by workflow run ${{ github.run_id }}
artifacts: ${{ steps.find_file.outputs.file }}
token: ${{ secrets.RELEASE_TOKEN }}
allowUpdates: true