Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Egorov committed Dec 13, 2024
1 parent 0576cbd commit bf83e10
Showing 1 changed file with 71 additions and 71 deletions.
142 changes: 71 additions & 71 deletions .github/workflows/prepare-xcframework-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,48 @@ jobs:
bundle install
pod install --repo-update
- name: Archieve iphoneos
run: |
xcodebuild archive \
-workspace "${{ github.event.inputs.product_name }}.xcworkspace" \
-scheme "${{ github.event.inputs.xcode_scheme }}" \
-sdk iphoneos \
-archivePath "xcf/${{ github.event.inputs.product_name }}-iphoneos.xcarchive" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
shell: bash
# - name: Archieve iphoneos
# run: |
# xcodebuild archive \
# -workspace "${{ github.event.inputs.product_name }}.xcworkspace" \
# -scheme "${{ github.event.inputs.xcode_scheme }}" \
# -sdk iphoneos \
# -archivePath "xcf/${{ github.event.inputs.product_name }}-iphoneos.xcarchive" \
# SKIP_INSTALL=NO \
# BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
# shell: bash

- name: Archieve iphonesimulator
run: |
xcodebuild archive \
-workspace "${{ github.event.inputs.product_name }}.xcworkspace" \
-scheme "${{ github.event.inputs.xcode_scheme }}" \
-sdk iphonesimulator \
-archivePath "xcf/${{ github.event.inputs.product_name }}-iossimulator.xcarchive" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
shell: bash
# - name: Archieve iphonesimulator
# run: |
# xcodebuild archive \
# -workspace "${{ github.event.inputs.product_name }}.xcworkspace" \
# -scheme "${{ github.event.inputs.xcode_scheme }}" \
# -sdk iphonesimulator \
# -archivePath "xcf/${{ github.event.inputs.product_name }}-iossimulator.xcarchive" \
# SKIP_INSTALL=NO \
# BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
# shell: bash

- name: Create xcframework
run: |
xcodebuild -create-xcframework \
-framework "xcf/${{ github.event.inputs.product_name }}-iphoneos.xcarchive/Products/Library/Frameworks/${{ github.event.inputs.product_name }}.framework" \
-framework "xcf/${{ github.event.inputs.product_name }}-iossimulator.xcarchive/Products/Library/Frameworks/${{ github.event.inputs.product_name }}.framework" \
-output "xcf/${{ github.event.inputs.product_name }}.xcframework"
shell: bash
# - name: Create xcframework
# run: |
# xcodebuild -create-xcframework \
# -framework "xcf/${{ github.event.inputs.product_name }}-iphoneos.xcarchive/Products/Library/Frameworks/${{ github.event.inputs.product_name }}.framework" \
# -framework "xcf/${{ github.event.inputs.product_name }}-iossimulator.xcarchive/Products/Library/Frameworks/${{ github.event.inputs.product_name }}.framework" \
# -output "xcf/${{ github.event.inputs.product_name }}.xcframework"
# shell: bash

- name: Zip xcframework
run: |
cd xcf
zip -r GliaWidgetsXcf.xcframework.zip GliaWidgets.xcframework
shell: bash

- name: Calculate checksum
id: calculate_xcf_checksum
run: |
cd xcf
echo "checksum=$(swift package compute-checksum GliaWidgetsXcf.xcframework.zip | tail -1 | tr -d '\n')" >> "$GITHUB_OUTPUT"
shell: bash
# - name: Zip xcframework
# run: |
# cd xcf
# zip -r GliaWidgetsXcf.xcframework.zip GliaWidgets.xcframework
# shell: bash
#
# - name: Calculate checksum
# id: calculate_xcf_checksum
# run: |
# cd xcf
# echo "checksum=$(swift package compute-checksum GliaWidgetsXcf.xcframework.zip | tail -1 | tr -d '\n')" >> "$GITHUB_OUTPUT"
# shell: bash

- name: Fetch semver
id: fetch_semver
Expand All @@ -85,42 +85,42 @@ jobs:
- name: Update Package.swift
run: |
semver=${{ steps.fetch_semver.outputs.semver}}
checksum=${{ steps.calculate_xcf_checksum.outputs.checksum}}
checksum="mocked_checksum"
release_branch_name="release/xcf/${{ steps.fetch_semver.outputs.semver}}"
chmod +x ./scripts/update_ios_widgets_package.sh
./scripts/update_ios_widgets_package.sh "$semver" "$checksum" "$release_branch_name"
shell: bash

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: "release/xcf/${{ steps.fetch_semver.outputs.semver}}"
title: 'GliaWidgets SDK Release ${{ steps.fetch_semver.outputs.semver}}'
commit-message: |
GliaWidgets SDK XCFramework Release ${{ steps.fetch_semver.outputs.semver}}
base: 'master'

- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.fetch_semver.outputs.semver}}
release_name: "GliaWidgetsSDK Release ${{ steps.fetch_semver.outputs.semver}}"
draft: true
prerelease: false
body: |
GliaWidgetsSDK Release
xcframework checksum: `${{ steps.calculate_xcf_checksum.outputs.checksum }}`
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v6
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# branch: "release/xcf/${{ steps.fetch_semver.outputs.semver}}"
# title: 'GliaWidgets SDK Release ${{ steps.fetch_semver.outputs.semver}}'
# commit-message: |
# GliaWidgets SDK XCFramework Release ${{ steps.fetch_semver.outputs.semver}}
# base: 'master'

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "xcf/GliaWidgetsXcf.xcframework.zip"
asset_name: "GliaWidgetsXcf.xcframework.zip"
asset_content_type: "application/zip"
# - uses: actions/create-release@v1
# id: create_release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ steps.fetch_semver.outputs.semver}}
# release_name: "GliaWidgetsSDK Release ${{ steps.fetch_semver.outputs.semver}}"
# draft: true
# prerelease: false
# body: |
# GliaWidgetsSDK Release
# xcframework checksum: `${{ steps.calculate_xcf_checksum.outputs.checksum }}`
#
# - uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: "xcf/GliaWidgetsXcf.xcframework.zip"
# asset_name: "GliaWidgetsXcf.xcframework.zip"
# asset_content_type: "application/zip"

0 comments on commit bf83e10

Please sign in to comment.