diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2280c7e..2a7a9d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,9 +17,9 @@ jobs: - name: Checkout this Repo uses: actions/checkout@v2 - # print contents of GITHUB_WORKSPACE dir - - name: verify contents - run: ls $GITHUB_WORKSPACE + # # print contents of GITHUB_WORKSPACE dir + # - name: verify contents + # run: ls $GITHUB_WORKSPACE # Runs a this repo's action - name: Run Build action diff --git a/README.rst b/README.rst index c77d69a..ea563cb 100644 --- a/README.rst +++ b/README.rst @@ -3,13 +3,13 @@ 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 -Input Arguments -=============== +.. Input Arguments +.. =============== - * ``version`` : (Optional) Version of the Rainmeter rmskin package. - * ``title`` : (Optional) Name of the Rainmeter rmskin package. - * ``author`` : (Optional) Account Username maintaining the rmskin package. - * ``path`` : (Optional) Base directory of repo being packaged. +.. * ``version`` : (Optional) Version of the Rainmeter rmskin package. +.. * ``title`` : (Optional) Name of the Rainmeter rmskin package. +.. * ``author`` : (Optional) Account Username maintaining the rmskin package. +.. * ``path`` : (Optional) Base directory of repo being packaged. Output Arguments ================ @@ -21,25 +21,23 @@ Example Usage .. code-block:: yaml - jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: checkout a test repo of a rainmeter skin - # Checks-out a repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - with: - repositoy: 2bndy5/Goo-e-Rainmeter-Skin - - # Runs a this repo's action - - name: Run Build action - id: builder - uses: 2bndy5/rmskin-action - - # Use the output from the `builder` step - - name: Print the output path & filename - run: echo "The output file was ${{ steps.builder.outputs.arc_name }}" + jobs: + Build: + runs-on: ubuntu-latest + steps: + # Checkout code + - name: Checkout this Repo + uses: actions/checkout@v2 + + # # print contents of GITHUB_WORKSPACE dir + # - name: verify contents + # run: ls $GITHUB_WORKSPACE + + # Runs a this repo's action + - name: Run Build action + id: builder + uses: 2bndy5/rmskin-action@master + + # Use the output from the `builder` step + - name: Print the output path & filename + run: echo "The output file was ${{ steps.builder.outputs.arc_name }}" diff --git a/action.yml b/action.yml index 0ac3ffa..60f3b50 100644 --- a/action.yml +++ b/action.yml @@ -6,19 +6,19 @@ branding: icon: 'droplet' color: 'green' -inputs: - version: # 'auto' - description: 'Version of the Rainmeter rmskin package.' - required: false - title: # 'Unknown' - description: 'Name of the Rainmeter rmskin package.' - required: false - author: # 'Unknown' - description: 'Account Username maintaining the rmskin package.' - required: false - path: # '.' - description: 'Base directory of repo being packaged.' - required: false +# inputs: +# version: # 'auto' +# description: 'Version of the Rainmeter rmskin package.' +# required: false +# title: # 'Unknown' +# description: 'Name of the Rainmeter rmskin package.' +# required: false +# author: # 'Unknown' +# description: 'Account Username maintaining the rmskin package.' +# required: false +# path: # '.' +# description: 'Base directory of repo being packaged.' +# required: false outputs: arc_name: # path to & name of archive file that was generated description: 'path Filename of rmskin file' diff --git a/release.py b/release.py index 92eda3e..44894dd 100644 --- a/release.py +++ b/release.py @@ -65,7 +65,7 @@ "RMSKIN.ini": False, "Skins": 0, "Layouts": 0, - "Plugins": 0, + "Plugins": False, "@Vault": 0, } @@ -85,12 +85,12 @@ def main(): HAS_COMPONENTS["Skins"] = len(dirnames) print("Found {} possible Skin(s)".format(HAS_COMPONENTS["Skins"])) elif dirpath.endswith("@Vault"): - HAS_COMPONENTS["@Vault"] = len(dirnames) + len(filenames) + HAS_COMPONENTS["@Vault"] = len(filenames) + len(dirnames) print("Found {} possible @Vault item(s)".format(HAS_COMPONENTS["@Vault"])) elif dirpath.endswith("Plugins"): if len(dirnames) > 0: - HAS_COMPONENTS["Plugins"] = len(filenames) / len(dirnames) - print("Found {} possible Plugin(s)".format(HAS_COMPONENTS["Plugins"])) + HAS_COMPONENTS["Plugins"] = True + print("Found Plugins folder") elif dirpath.endswith("Layouts"): HAS_COMPONENTS["Layouts"] = len(filenames) + len(dirnames) print("Found {} possible Layout(s)".format(HAS_COMPONENTS["Layouts"])) @@ -98,13 +98,11 @@ def main(): HAS_COMPONENTS["RMSKIN.ini"] = True print("Found RMSKIN.ini file") for d in dirnames: # exclude hidden directories - print(f"looking at {d}") if d.startswith("."): del d # set depth of search to shallow (2 folders deep) if len(dirpath) > 0: dirnames.clear() - print("using working dir: {}".format(os.getcwd())) # quite if bad dir struct if not ( HAS_COMPONENTS["Layouts"]