Skip to content

Commit

Permalink
add manual
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasromanomr committed Nov 29, 2024
1 parent c9dd82c commit 6e0460c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 13 deletions.
65 changes: 55 additions & 10 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,77 @@ on:
pull_request_target:
branches: [main]
types: [closed]

workflow_dispatch:

jobs:
build:
name: Build XCFramework for Multiple Platforms
runs-on: macos-latest
strategy:
matrix:
build-config:
- {
scheme: "SkeletonView iOS",
destination: "generic/platform=iOS",
sdk: "iphoneos",
archive_path: "build/Release-iphoneos",
}
- {
scheme: "SkeletonView iOS",
destination: "generic/platform=iOS Simulator",
sdk: "iphonesimulator",
archive_path: "build/Release-iphonesimulator",
}
- {
scheme: "SkeletonView tvOS",
destination: "generic/platform=tvOS",
sdk: "appletvos",
archive_path: "build/Release-appletvos",
}
- {
scheme: "SkeletonView tvOS",
destination: "generic/platform=tvOS Simulator",
sdk: "appletvsimulator",
archive_path: "build/Release-appletvsimulator",
}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build framework
run: |
xcodebuild archive \
-scheme "${{ matrix.build-config.scheme }}" \
-destination "${{ matrix.build-config.destination }}" \
-sdk "${{ matrix.build-config.sdk }}" \
-archivePath "${{ matrix.build-config.archive_path }}/SkeletonView.xcarchive" \
SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
release_version:
if: github.event.pull_request.milestone == null && github.event.pull_request.merged == true
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2

- name: Publish release
id: publish_release
uses: release-drafter/release-drafter@v5
with:
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update podspec
- name: Update podspec
run: fastlane bump_version next_version:${{ steps.publish_release.outputs.tag_name }}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: 'main'
commit_message: 'Bump version ${{ steps.publish_release.outputs.tag_name }}'
branch: "main"
commit_message: "Bump version ${{ steps.publish_release.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy to Cocoapods
continue-on-error: true
Expand All @@ -38,7 +83,7 @@ jobs:
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push --allow-warnings
pod trunk push --allow-warnings
- name: Tweet the release
uses: ethomson/send-tweet-action@v1
Expand All @@ -51,4 +96,4 @@ jobs:
🎉 New release ${{ steps.publish_release.outputs.tag_name }} is out 🚀
Check out all the changes here:
${{ steps.publish_release.outputs.html_url }}
${{ steps.publish_release.outputs.html_url }}
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// swift-tools-version:5.3
// swift-tools-version:5.10

import PackageDescription

let package = Package(
name: "SkeletonView",
platforms: [
.iOS(.v9),
.tvOS(.v9)
.iOS(.v12),
.tvOS(.v12)
],
products: [
.library(
Expand Down

0 comments on commit 6e0460c

Please sign in to comment.