Update resources on RedGuides with this github action. You'll need to have a REDGUIDES_API_KEY secret in your repository, and of course a RedGuides API key which is easy to obtain (info below).
This action will update an existing resource on redguides.com to which you have ownership/team access.
All inputs are optional except for resource_id. If you provide message, you must also provide version (it's used as the update title).
-
resource_id (required):
The ID of the resource to update. Must already exist on RedGuides. -
description (optional):
Path to a description file (e.g.,README.md) which will become the "overview" description of your resource. -
version (required if message is provided)
New version number for the release (e.g.,v1.0.1). Used as the update title when posting amessage. Recommended when uploading afile(otherwise XenForo defaults to today's date). -
message (optional):
Version update message (plain text), or path to a file (likeCHANGELOG.md) ideally in "keep a changelog" format. If provided, requiresversion(used as the update title). -
file (optional):
Path to your single, zipped/compiled release file. Ifversionis omitted, XenForo will default the version to today's date. -
domain (optional):
Only used for markdown files that contain relative URLs. This will prepend the domain to relative URLs (e.g.,https://raw.githubusercontent.com/yourusername/yourrepo/main/).
REDGUIDES_API_KEY: Required. Your RedGuides API key. This should be set as a secret in your GitHub repository.
You can obtain a permanent RedGuides API key by asking me (Redbot) on the site, or by hacking a client you use for redguides.
name: Publish to RedGuides
on:
push:
branches: [ "main" ]
jobs:
redfetch-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Build Zip File
run: zip -r release.zip src/
- name: Publish to RedGuides
uses: RedGuides/redguides-publish@v1
env:
REDGUIDES_API_KEY: ${{ secrets.REDGUIDES_API_KEY }}
with:
resource_id: '12345'
description: 'README.md'
version: 'v1.0.1'
message: 'CHANGELOG.md'
file: 'release.zip'
domain: 'https://raw.githubusercontent.com/yourusername/yourrepo/main/'