Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Bloodyairtimer
Copy link

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.

@Kebechet
Copy link
Owner

Thanks man for the contribution! I was too lazy to implement this 😅
In following days I will take a look.

Resolves: #36

@Bloodyairtimer
Copy link
Author

Thanks man for the contribution! I was too lazy to implement this 😅 In following days I will take a look.

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.

@Kebechet
Copy link
Owner

Thanks man for the contribution! I was too lazy to implement this 😅 In following days I will take a look.
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:
Android
iOS
it should answer you most questions on how to create updated bindings.

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.
Why do you need a newer one ? (I am not against the update I just didnt have a reason to do it)

@Bloodyairtimer
Copy link
Author

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.

@Kebechet
Copy link
Owner

Kebechet commented Nov 16, 2024

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.

Copy link
Owner

@Kebechet Kebechet left a 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

Comment on lines +40 to +41
- 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
Copy link
Owner

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'
Copy link
Owner

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

Comment on lines +10 to +11
pull_request:
branches: [ "main" ]
Copy link
Owner

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

Comment on lines +54 to +68
- 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
}
Copy link
Owner

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants