A script that will attempt to assemble a validating Rainmeter skin package for quick and easy distribution on Github.
Project description
rmskin-action
A Python-based Github action tool to package a Repository’s Rainmeter Content into a validating .rmskin file for Rainmeter’s Skin Installer.
rmskin-builder Python package
This action’s rmskin-builder.py is now also available as a Python executable script via PyPI. However, it is important that your Python installation’s Scripts folder is found in your Operating System’s environment variable PATH. If you’re using a Python virtual environment, then the Scripts folder does not need to be in your Operating System’s environment variable PATH.
pip install rmskin-builder
rmskin-builder.exe --help
Input Arguments
Argument |
Description |
Required |
---|---|---|
version |
Version of the Rainmeter rmskin package. Defaults to last 8 digits of SHA from commit or ref/tags or otherwise ‘x0x.x0xy’. |
no |
title |
Name of the Rainmeter rmskin package. Defaults to name of repository or otherwise the last directory in the path argument. |
no |
author |
Account Username maintaining the rmskin package. Defaults to Username that triggered the action or otherwise ‘Unknown’. |
no |
path |
Base directory of repo being packaged. Defaults to current working path |
no |
dir_out |
Path to save generated rmskin package. Defaults to current working path |
no |
The above arguments are used as CLI arguments to the rmskin_builder.py script, but remember to append the CLI arguments’ name with a --. For example, setting the path argument to use a relative directory called tests:
rmskin-builder.exe --path tests
Output Arguments
arc_name : The name of the generated rmskin file saved in the path specified by dir_out input argument.
If executing the rmskin_builder.py script when not in a Github Action Runner, then this output argument will show in the script’s log output (& not saved anywhere).
Ideal Repo Structure
root directory
Skins a folder to contain all necessary Rainmeter skins
RMSKIN.ini list of options specific to installing the skin(s)
Layouts a folder that contains Rainmeter layout files
Plugins a folder that contains Rainmeter plugins
@Vault resources folder accessible by all installed skins
Example Usage
name: RMSKIN Packager
on:
push:
pull_request:
release:
types: [published]
jobs:
Build_n_Release:
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout this Repo
uses: actions/checkout@v3
# Runs a rmskin packager action
- name: Run Build action
id: builder
uses: 2bndy5/rmskin-action@v1.1.8
# Upload the asset (using the output from the `builder` step)
- name: Upload Release Asset
if: github.event_name == 'release'
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.builder.outputs.arc_name }}
asset_content_type: application/zip