Skip to content

fix(android): add missing transitive deps for native core 5.8.0+ #32

fix(android): add missing transitive deps for native core 5.8.0+

fix(android): add missing transitive deps for native core 5.8.0+ #32

Workflow file for this run

# Using TrustedPublisher for NuGet publishing
# The workflow name is set to cd.yml and should be updated if this file is renamed.
# We do NOT need NUGET_API_KEY in secrets.
name: Publish to Github & NuGet
permissions:
id-token: write # Required for OIDC
contents: write
on:
workflow_dispatch:
pull_request:
types:
- closed
branches:
- main
- rel/**
jobs:
publish:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true &&
contains(github.event.pull_request.title, 'chore: Release'))
runs-on: macos-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Get version from nuspec
id: version
run: |
VERSION=$(grep '<version>' OneSignalSDK.DotNet.nuspec | sed -E 's/.*<version>([^<]+)<\/version>.*/\1/' | head -1)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- name: NuGet login
uses: nuget/login@v1
id: login
with:
# Needs to be an Owner (not an Org) of the package
user: OneSignal_SDK
- name: Restore workloads
run: dotnet workload restore
- name: Build
run: dotnet build OneSignalSDK.DotNet/OneSignalSDK.DotNet.csproj -c Release /p:Version=${{ steps.version.outputs.version }}
- name: Extract iOS resources
run: unzip OneSignalSDK.DotNet.iOS.Binding/bin/Release/net10.0-ios/OneSignalSDK.DotNet.iOS.Binding.resources.zip -d OneSignalSDK.DotNet.iOS.Binding/bin/Release/net10.0-ios/OneSignalSDK.DotNet.iOS.Binding.resources/
- name: Pack
run: dotnet pack OneSignalSDK.DotNet/OneSignalSDK.DotNet.csproj --no-build -c Release /p:NuspecFile=../OneSignalSDK.DotNet.nuspec -o ./artifacts
- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
create-release:
needs: publish
uses: OneSignal/sdk-shared/.github/workflows/github-release.yml@main
secrets:
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
with:
version: ${{ needs.publish.outputs.version }}