obsproject / obs-plugintemplate

GNU General Public License v2.0
289 stars 134 forks source link

Auto generate plugin name in workflow #44

Closed cg2121 closed 1 year ago

cg2121 commented 2 years ago

Description

This generates the plugin name based on the name in the buildspec file.

Motivation and Context

One less file for developers to change.

How Has This Been Tested?

Ran workflow.

Types of changes

Checklist:

PatTheMav commented 2 years ago

I think the idea is sound, however the plugin name is defined in the buildspec.json file (the build script even updates CMakeList.txt with name and version with the values from it).

So IMO the "correct" change would be a step that parses the JSON file and sets that as an output variable that's then re-used throughout the workflow.

PatTheMav commented 1 year ago

@cg2121 I guess the most portable way would be to add code to the respective "Setup Environment" steps in the workflow to parse the buildspec file and then print that value to $GITHUB_OUTPUT so you can reuse it in the later workflow steps.

cg2121 commented 1 year ago

Updated to use the suggestion by @PatTheMav