Skip to content

Commit 69f8c46

Browse files
committed
for testing action
1 parent a380ded commit 69f8c46

File tree

1 file changed

+0
-129
lines changed

1 file changed

+0
-129
lines changed

.github/workflows/publish-release.yml

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -56,135 +56,6 @@ jobs:
5656
echo "version=$VERSION" >> $GITHUB_OUTPUT
5757
echo "Extracted version: $VERSION"
5858
59-
- name: 📋 Display Configuration
60-
run: |
61-
echo "============================================"
62-
echo "📦 Release Version: ${{ steps.extract_version.outputs.version }}"
63-
echo "🌿 Branch: ${{ steps.detect_branch.outputs.branch }}"
64-
echo "============================================"
65-
66-
- name: Setup Ruby
67-
uses: ruby/setup-ruby@v1
68-
with:
69-
ruby-version: "3.0"
70-
71-
- name: Install CocoaPods
72-
run: |
73-
gem install cocoapods
74-
pod --version
75-
76-
- name: Validate OneSignal.podspec
77-
run: |
78-
echo "Validating OneSignal.podspec..."
79-
pod spec lint OneSignal.podspec --allow-warnings
80-
81-
- name: Validate OneSignalXCFramework.podspec
82-
run: |
83-
echo "Validating OneSignalXCFramework.podspec..."
84-
pod spec lint OneSignalXCFramework.podspec --allow-warnings
85-
86-
- name: Publish OneSignal.podspec to CocoaPods Trunk
87-
run: |
88-
echo "Publishing OneSignal.podspec to CocoaPods Trunk..."
89-
pod trunk push OneSignal.podspec --allow-warnings
90-
91-
- name: Publish OneSignalXCFramework.podspec to CocoaPods Trunk
92-
run: |
93-
echo "Publishing OneSignalXCFramework.podspec to CocoaPods Trunk..."
94-
pod trunk push OneSignalXCFramework.podspec --allow-warnings
95-
96-
- name: ✅ CocoaPods Published
97-
run: |
98-
VERSION="${{ steps.extract_version.outputs.version }}"
99-
echo "============================================"
100-
echo "✅ Successfully published version $VERSION to CocoaPods!"
101-
echo "============================================"
102-
echo "📦 OneSignal: https://cocoapods.org/pods/OneSignal"
103-
echo "📦 OneSignalXCFramework: https://cocoapods.org/pods/OneSignalXCFramework"
104-
105-
- name: Checkout OneSignal-XCFramework
106-
uses: actions/checkout@v4
107-
with:
108-
repository: OneSignal/OneSignal-XCFramework
109-
ref: ${{ steps.detect_branch.outputs.branch }}
110-
path: xcframework-repo
111-
fetch-depth: 0
112-
token: ${{ secrets.PAT_TOKEN_ONESIGNAL_XCFRAMEWORK }}
113-
114-
- name: Get iOS SDK Release Body
115-
id: get_ios_release
116-
run: |
117-
VERSION="${{ steps.extract_version.outputs.version }}"
118-
119-
# Fetch the release body from OneSignal-iOS-SDK
120-
if gh release view "$VERSION" --repo OneSignal/OneSignal-iOS-SDK --json body --jq '.body' > ios_release_body.md 2>/dev/null; then
121-
echo "✅ Found iOS SDK release for version $VERSION"
122-
echo "found=true" >> $GITHUB_OUTPUT
123-
else
124-
echo "⚠️ No iOS SDK release found for version $VERSION"
125-
echo "found=false" >> $GITHUB_OUTPUT
126-
echo "" > ios_release_body.md
127-
fi
128-
129-
- name: Create GitHub Release for OneSignal-XCFramework
130-
env:
131-
GH_TOKEN: ${{ secrets.PAT_TOKEN_ONESIGNAL_XCFRAMEWORK }}
132-
run: |
133-
VERSION="${{ steps.extract_version.outputs.version }}"
134-
BRANCH="${{ steps.detect_branch.outputs.branch }}"
135-
136-
cd xcframework-repo
137-
138-
# Configure git
139-
git config --local user.email "[email protected]"
140-
git config --local user.name "github-actions[bot]"
141-
142-
# Create and push tag
143-
git tag -a "$VERSION" -m "Release $VERSION"
144-
git push origin "$VERSION"
145-
146-
echo "✅ Created and pushed tag: $VERSION to OneSignal-XCFramework"
147-
148-
# Use iOS SDK release body if available, otherwise create default release notes
149-
if [[ "${{ steps.get_ios_release.outputs.found }}" == "true" ]] && [[ -s ../ios_release_body.md ]]; then
150-
echo "Using release notes from iOS SDK release"
151-
cp ../ios_release_body.md release_notes.md
152-
else
153-
echo "No iOS SDK release body found, generating default release notes"
154-
echo "## 🔖 Release $VERSION" > release_notes.md
155-
echo "" >> release_notes.md
156-
echo "This release corresponds to [OneSignal-iOS-SDK $VERSION](https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/$VERSION)" >> release_notes.md
157-
fi
158-
159-
# Determine if this is a pre-release
160-
PRERELEASE_FLAG=""
161-
if [[ "$VERSION" == *"alpha"* ]] || [[ "$VERSION" == *"beta"* ]]; then
162-
PRERELEASE_FLAG="--prerelease"
163-
echo "Marking as pre-release (alpha/beta detected)"
164-
fi
165-
166-
# Create GitHub release
167-
gh release create "$VERSION" \
168-
--repo OneSignal/OneSignal-XCFramework \
169-
--title "$VERSION" \
170-
--notes-file release_notes.md \
171-
--target "$BRANCH" \
172-
$PRERELEASE_FLAG
173-
174-
echo "✅ GitHub release created successfully for OneSignal-XCFramework!"
175-
echo "🔗 https://github.com/OneSignal/OneSignal-XCFramework/releases/tag/$VERSION"
176-
177-
- name: ✅ All Steps Complete
178-
run: |
179-
VERSION="${{ steps.extract_version.outputs.version }}"
180-
echo "============================================"
181-
echo "✅ Successfully completed all release steps for version $VERSION"
182-
echo "============================================"
183-
echo "📦 CocoaPods OneSignal: https://cocoapods.org/pods/OneSignal"
184-
echo "📦 CocoaPods OneSignalXCFramework: https://cocoapods.org/pods/OneSignalXCFramework"
185-
echo "🔗 iOS SDK Release: https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/$VERSION"
186-
echo "🔗 XCFramework Release: https://github.com/OneSignal/OneSignal-XCFramework/releases/tag/$VERSION"
187-
18859
wrapper_prs:
18960
needs: publish
19061
uses: OneSignal/sdk-actions/.github/workflows/create-wrapper-prs.yml@main

0 commit comments

Comments
 (0)