-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding github actions pipeline for automatic delivery to nuget.org #47
base: main
Are you sure you want to change the base?
Conversation
Thanks man for the contribution! I was too lazy to implement this 😅 Resolves: #36 |
Just a small contribution for the work you did for migrating it to MAUI. And it would come handy as i'm working on an upgrade of the revenuecat SDK and the upgrade to .net 9. Not sure if my knowledge of binding projects would be enough to do that. |
I tried to put all necessary information how to create those bindings into READMEs: Our project will migrate to .NET 9 in january/february so until than I wont bump the package version. But even if it is on .NET8 it should be backward compatible. Regarding upgrade to newer RevenueCat versions, we didnt need any new features and the current one seems to be stable. |
Currently having some issues upgrading the Android part as there are some AndroidX references that need a different version. Upgrading the RevenueCat SDK was mainly for trying to see if I could use the paywalls. If I looked correctly at the current version used that's not in there yet. |
Regarding Android compatibility I had to work with Android lib versions that were compatible with AndroidX bindings already created for MAUI. Sometimes updating to the latest RevenueCat version is not possible because versions they use are not yet created for MAUI. I havent worked with paywalls yet, so Idk how do they work. But certainly it would be a good feature to add If you resolve some other problems regarding binding creation that are not mentioned in the Readme please update it as well so that next time we have less struggles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution I gave you some feedback on your PR
- name: Build Maui.RevenueCat.InAppBilling solution | ||
run: dotnet build ${{ env.SLN_PATH }} -c ${{ env.BUILD_CONFIGURATION }} -p:Version=${{ env.BUILD_NUMBER }}.${{ github.run_number }} --no-restore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to build just the concrete project instead of whole solution. Because e.g. iOS
project requires MAC for proper build
branches: [ "main" ] | ||
|
||
env: | ||
BUILD_NUMBER: '4.6' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently we dont have auto-versioning setup. So for now please remove this so that the version in .csproj
is used
pull_request: | ||
branches: [ "main" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think we want to publish also pull requests
- name: Upload archive to releases | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: 'maui.revenuecat.inappbilling_${{ env.BUILD_NUMBER }}.${{ github.run_number }}.zip' | ||
tag: ${{ env.BUILD_NUMBER }}.${{ github.run_number }} | ||
|
||
# Publish all NuGet packages to NuGet.org | ||
# Use --skip-duplicate to prevent errors if a package with the same version already exists. | ||
# If you retry a failed workflow, already published packages will be skipped without error. | ||
- name: Push Maui.RevenueCat.InAppBilling to nuget.org | ||
if: false # Remove line when NUGET_APIKEY is configured. | ||
run: | | ||
foreach($file in (Get-ChildItem "src/Maui.RevenueCat.InAppBilling/bin/release/" -Recurse -Include *.nupkg)) { | ||
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please put publish into separate job ?
Added a pipeline for automatic build + package creation and versioning for pushing to nuget.org.
Only thing to configure is the API-key for pushing to nuget.org and remove the if: false from the nuget push step.