Skip to content

Commit

Permalink
Merge pull request #17 from usefulness/updates
Browse files Browse the repository at this point in the history
Test on various OSs
  • Loading branch information
mateuszkwiecinski authored Mar 10, 2024
2 parents 6ed073b + 0a2b808 commit 59c81bc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,18 @@ jobs:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}

os-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
name: OS smoke test
steps:
- uses: actions/checkout@v4

- id: agp-version-finder
uses: ./

- run: echo "${{join(steps.agp-version-finder.outputs.*, ' ')}}"
15 changes: 10 additions & 5 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ def version_regex(_suffix):


def is_debug():
return os.getenv("INPUT_DEBUG", False)
return os.getenv("INPUT_DEBUG", "false").casefold() == "true".casefold()


def github_output(key, value):
with open(os.environ['GITHUB_OUTPUT'], mode='a', encoding='UTF-8') as fh:
print(f'{key}={value}', file=fh)


url = "https://dl.google.com/android/maven2/com/android/tools/build/gradle/maven-metadata.xml"
Expand Down Expand Up @@ -39,7 +44,7 @@ def is_debug():
rc_count={len(all_rc)}
""")

os.system(f"echo \"latest-stable={all_stable[-1]}\" >> $GITHUB_OUTPUT")
os.system(f"echo \"latest-alpha={all_alpha[-1]}\" >> $GITHUB_OUTPUT")
os.system(f"echo \"latest-beta={all_beta[-1]}\" >> $GITHUB_OUTPUT")
os.system(f"echo \"latest-rc={all_rc[-1]}\" >> $GITHUB_OUTPUT")
github_output(key="latest-stable", value=all_stable[-1])
github_output(key="latest-alpha", value=all_alpha[-1])
github_output(key="latest-beta", value=all_beta[-1])
github_output(key="latest-rc", value=all_rc[-1])

0 comments on commit 59c81bc

Please sign in to comment.