Skip to content

Commit

Permalink
update CI; use newer Github Output (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 authored Jan 14, 2023
1 parent a0c93a2 commit 9aa08ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout this Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.x

- name: Install Dependencies
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout this Repo
uses: actions/checkout@v2
uses: actions/checkout@v3

# Runs a this repo's action
- name: Run Build action
Expand Down
9 changes: 5 additions & 4 deletions rmskin_builder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/python3
"""
A script that will attempt to assemble a validating Rainmeter skin package for
quick and easy distibution on Github.
quick and easy distribution on Github.
Ideal Repo Structure
********************
Expand Down Expand Up @@ -91,7 +91,7 @@


def discover_components(path):
"""The method that does priliminary dscovery of rmskin package components."""
"""The method that does preliminary discovery of rmskin package components."""
for dirpath, dirnames, filenames in os.walk(path):
dirpath = dirpath.replace(path, "")
if dirpath.endswith("Skins"):
Expand Down Expand Up @@ -169,7 +169,7 @@ def parse_rmskin_ini(args, path, build_dir):
raise RuntimeError("On-install loaded file does not exits.")
else:
raise RuntimeError("RMSKIN.ini is malformed")
with open(build_dir + "RMSKIN.ini", "w") as conf:
with open(build_dir + "RMSKIN.ini", "w", encoding="utf-8") as conf:
config.write(conf) # Dump changes/corrections to temp build dir
return (arc_name, version)

Expand Down Expand Up @@ -308,7 +308,8 @@ def main():

# env var CI is always true when executed on a github action runner
if os.getenv("CI", "false").title().startswith("True"):
print("::set-output name=arc_name::{}".format(archive_name))
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as gh_out:
gh_out.write(f"arc_name={archive_name}")
else:
logger.info("Archive name: %s", archive_name)

Expand Down

0 comments on commit 9aa08ca

Please sign in to comment.