Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/release-drafter.yml

This file was deleted.

100 changes: 0 additions & 100 deletions .github/workflows/cd.yml

This file was deleted.

87 changes: 87 additions & 0 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Create GitHub Release

# This workflow creates a GitHub release in iOS-SDK and attaches the built zip files.
# Run this AFTER the release PR has been merged.

on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch:
inputs:
ref:
description: 'Branch or commit SHA to run on (e.g., main, 5.3-main)'
type: string
required: false
default: 'main'

permissions:
contents: write
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Step 1: Extract version from podspec
get-version:
runs-on: ubuntu-latest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work on Ubuntu?

outputs:
version: ${{ steps.extract_version.outputs.version }}
steps:
- name: Checkout OneSignal-iOS-SDK
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}

- name: Extract release version from podspec
id: extract_version
run: |
VERSION=$(grep -E "s.version\s*=" OneSignal.podspec | sed -E 's/.*"(.*)".*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"

# Step 2: Use reusable workflow to create GitHub release with release notes
create-release:
needs: get-version
uses: OneSignal/sdk-actions/.github/workflows/github-release.yml@main
with:
version: ${{ needs.get-version.outputs.version }}

# Step 3: Upload the 10 xcframework zips to the release
upload-assets:
needs: [get-version, create-release]
runs-on: macos-13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you are using two instances? why dont do everything in one isntance?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id imagine for this upload job, ubuntu should work?


env:
VERSION: ${{ needs.get-version.outputs.version }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this token?

GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout OneSignal-iOS-SDK
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}

- name: 📋 Display Configuration
run: |
echo "============================================"
echo "📦 Uploading assets for version: $VERSION"
echo "============================================"

- name: Upload xcframework zips to release
run: |
cd iOS_SDK/OneSignalSDK

gh release upload "$VERSION" \
OneSignalCore.xcframework.zip \
OneSignalExtension.xcframework.zip \
OneSignalFramework.xcframework.zip \
OneSignalInAppMessages.xcframework.zip \
OneSignalLiveActivities.xcframework.zip \
OneSignalLocation.xcframework.zip \
OneSignalNotifications.xcframework.zip \
OneSignalOSCore.xcframework.zip \
OneSignalOutcomes.xcframework.zip \
OneSignalUser.xcframework.zip

echo "✅ All xcframework zips uploaded successfully!"
echo "🔗 https://github.com/${{ github.repository }}/releases/tag/$VERSION"
Loading
Loading