Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test on various OSs
Browse files Browse the repository at this point in the history
mateuszkwiecinski committed Mar 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6ed073b commit 253acda
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
@@ -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: Run action
steps:
- uses: actions/checkout@v4

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

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


def is_debug():
return os.getenv("INPUT_DEBUG", False)
return os.getenv("INPUT_DEBUG").casefold() is "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"
@@ -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 253acda

Please sign in to comment.