android-actions / setup-android

Android SDK setup for GitHub Actions
MIT License
204 stars 69 forks source link

Deprecated GitHub actions usage #355

Closed TWiStErRob closed 2 years ago

TWiStErRob commented 2 years ago

Warning: The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Example: https://github.com/TWiStErRob/glide-support/actions/runs/3275044365/jobs/5389377582#step:3:710

Similar fix: https://github.com/actions/checkout/pull/962/files#diff-321508dc4e9600826d25995a75796331f7015f0faeaea651daf659bf3e8a98f6L46

TWiStErRob commented 2 years ago

Will be solved by https://github.com/android-actions/setup-android/pull/347, because you only use setOutput.

ViliusSutkus89 commented 2 years ago

Thanks for bringing this up. Kind of an easy fix. Let's see if the warnings go away

TWiStErRob commented 2 years ago

Confirmed fixed! Re-ran the the job I quoted above on the same commit.

      - name: Set up Android SDK.
        uses: android-actions/setup-android@v2

Before: https://github.com/TWiStErRob/glide-support/actions/runs/3275044365/jobs/5389377582#step:3:710 image

After: https://github.com/TWiStErRob/glide-support/actions/runs/3275044365/jobs/5393688733#step:3:708 image

Thanks for the amazing turnaround.

ViliusSutkus89 commented 2 years ago

No need to thank me, that warning would have turned into an error eventually. Now I need to find 20+ different places in other projects where I use set-output manually

TWiStErRob commented 2 years ago

Not much: https://github.com/search?q=user%3AViliusSutkus89+set-output&type=code

Example that might help (if you have non-trivial echo): https://github.com/TWiStErRob/net.twisterrob.sun/pull/156

kyhule commented 1 year ago

Should I be surprised to still see this error on v2.0.2?

CleanShot 2023-02-22 at 17 07 03@2x
TWiStErRob commented 1 year ago

Weird the only usage is here: https://github.com/android-actions/setup-android/blame/main/src/main.ts#L184 And that's still a valid usage, because the actions/core dependency is 1.10.0, bumped by #347

@ViliusSutkus89 is it possible you didn't do npm install at one point when you rebuild the dist?

TWiStErRob commented 1 year ago

I have a recent execution on v2 https://github.com/TWiStErRob/net.twisterrob.sun/actions/runs/4247851865/jobs/7386353596#step:4:8, no warnings.

TWiStErRob commented 1 year ago

@kyhule 2.0.2 is really old, the fix only exists in 2.0.10: https://github.com/android-actions/setup-android/tags

kyhule commented 1 year ago

@TWiStErRob Ah sorry about that. This is the first time using GitHub actions. I was using v2.0.2 because that is the version listed as the latest on the actions marketplace. I'll upgrade to v2.0.10 today! Screenshot_20230223-080443.png

TWiStErRob commented 1 year ago

I recommend you just use @v2, then this is not a problem, you get free patches. @ViliusSutkus89 any idea what's missing for recent versions to show up at https://github.com/marketplace/actions/setup-android-sdk-tools?