Skip to content

Commit

Permalink
Merge pull request #8 from saturdaymp/release/v2.0
Browse files Browse the repository at this point in the history
Merge v2.0.0 into main
  • Loading branch information
mrbiggred authored Aug 3, 2023
2 parents 2d85ed4 + f780751 commit 1ec718b
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 25 deletions.
74 changes: 62 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,50 @@
name: CI

on: [push]
on:
push:
branches: [ main, release/* ]
tags: [ v* ]
pull_request:
branches: [ main, release/* ]

jobs:
build:
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required for Calculate Version step (e.g. GitVersion)

# Required by GitVersion
- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.12.0'

- name: GitVersion Config
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
additionalArguments: '/showConfig'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
additionalArguments: '/updateprojectfiles'

- name: Install GitReleaseManager
uses: gittools/actions/gitreleasemanager/setup@v0.10.2
with:
versionSpec: '0.13.0'

- name: Show SDKS
run: xcodebuild -showsdks
Expand All @@ -18,33 +55,46 @@ jobs:
- name: Build iOS Simulator
run: |
xcodebuild -sdk iphonesimulator -project "Sample Project/CheckBox.xcodeproj" -derivedDataPath build -scheme BEMCheckBox -configuration Release EXCLUDED_ARCHS="arm64"
ls -la build/Build/Products/Release-iphonesimulator
ls -la build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework
echo "Listing: build/Build/Products/Release-iphonesimulator" && ls -la build/Build/Products/Release-iphonesimulator
echo "Listing: build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework" && ls -la build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework
lipo -info build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework/BEMCheckBox
- name: Build iOS Device
run: |
xcodebuild -sdk iphoneos -project "Sample Project/CheckBox.xcodeproj" -derivedDataPath build -scheme BEMCheckBox -configuration Release
ls -la build/Build/Products/Release-iphoneos
ls -la build/Build/Products/Release-iphoneos/BEMCheckBox.framework
echo "Listing: build/Build/Products/Release-iphoneos" && ls -la build/Build/Products/Release-iphoneos
echo "Listing: build/Build/Products/Release-iphoneos/BEMCheckBox.framework" && ls -la build/Build/Products/Release-iphoneos/BEMCheckBox.framework
lipo -info build/Build/Products/Release-iphoneos/BEMCheckBox.framework/BEMCheckBox
- name: Combine Builds
run: |
cp -R build/Build/Products/Release-iphoneos/ Release-fat
ls -la Release-fat
ls -la Release-fat/BEMCheckBox.framework/BEMCheckBox
echo "Listing: Release-fat" && ls -la Release-fat
echo "Listing: Release-fat/BEMCheckBox.framework/BEMCheckBox" && ls -la Release-fat/BEMCheckBox.framework/BEMCheckBox
- name: Build FAT Binary
- name: Build fat Binary
run: |
lipo -create -output Release-fat/BEMCheckBox.framework/BEMCheckBox build/Build/Products/Release-iphoneos/BEMCheckBox.framework/BEMCheckBox build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework/BEMCheckbox
lipo -info Release-fat/BEMCheckBox.framework/BEMCheckBox
file Release-fat/BEMCheckBox.framework/BEMCheckBox
ls -la Release-fat
ls -la Release-fat/BEMCheckBox.framework
echo "Listing: Release-fat" && ls -la Release-fat
echo "Listing: Release-fat/BEMCheckBox.framework" && ls -la Release-fat/BEMCheckBox.framework
# Upload the directory, not a zip file, as uploading an artificate will automatically zip it
# and we don't want a zip in a zip.
- name: Upload Build Artificates to GitHub Workflow
uses: actions/upload-artifact@v3
with:
name: BEMCheckBox.framework
name: BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework
path: Release-fat/BEMCheckBox.framework

# Only update to the release on a tag push. Assume the release exists by the
# time we create the tag. Also we need to create the zip as uploading to the release
# does not automatically zip the file.
- name: Upload fat Binary to GitHub Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
cd Release-fat/BEMCheckBox.framework
zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip .
echo "Listing: Release-fat/BEMCheckbox.framework" && ls -la
dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip
8 changes: 4 additions & 4 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Release Notes

on:
push:
branches: [ main, release* ]
branches: [ main, release/* ]
pull_request:
branches: [ main, release* ]
branches: [ main, release/* ]

jobs:
generate-release-notes:
Expand Down Expand Up @@ -50,12 +50,12 @@ jobs:
# Work around this by checking for success or no closed issue errors.
- name: Create Release ${{ steps.gitversion.outputs.majorMinorPatch }}
run: |
dotnet gitreleasemanager create --owner saturdaymp --repository BEMCheckBox --token ${{ secrets.GITHUB_TOKEN }} --milestone v${{ steps.gitversion.outputs.majorMinorPatch }} --logFilePath output.txt || true
dotnet gitreleasemanager create --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --token ${{ secrets.GITHUB_TOKEN }} --milestone v${{ steps.gitversion.outputs.majorMinorPatch }} --logFilePath output.txt || true
cat output.txt | grep 'No closed issues have been found for milestone\|Drafted release is available at'
- name: 'Generate Change Log'
run: |
dotnet-gitreleasemanager export --token ${{ secrets.GITHUB_TOKEN }} -o 'saturdaymp' -r 'BEMCheckBox' -f 'CHANGELOG.md'
dotnet-gitreleasemanager export --token ${{ secrets.GITHUB_TOKEN }} -o '${{ github.repository_owner }}' -r '${{ github.event.repository.name }}' -f 'CHANGELOG.md'
git add --renormalize CHANGELOG.md
cat CHANGELOG.md
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## v2.0.0 (Aug, 3, 2023)


As part of this release we had [2 issues](https://github.com/saturdaymp/BEMCheckBox/milestone/1?closed=1) closed.
As part of this release we had [5 issues](https://github.com/saturdaymp/BEMCheckBox/milestone/1?closed=1) closed.



Expand All @@ -12,6 +12,12 @@ __Breaking__
__DevOps__

- [__#3__](https://github.com/saturdaymp/BEMCheckBox/pull/3) Create GitHub Action to build package for XPlugins.iOS.BEMCheckBox
- [__#6__](https://github.com/saturdaymp/BEMCheckBox/pull/6) Update build to upload fat binary to GitHub Release
- [__#7__](https://github.com/saturdaymp/BEMCheckBox/pull/7) Upload release to GitHub

__Documentation__

- [__#5__](https://github.com/saturdaymp/BEMCheckBox/pull/5) Update release note for v2.0.0 release

## 1.1.0 (Oct, 17, 2015)

Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

<p align="center"><img src="./.assets/BEMCheckBox logo.jpg"/></p>

**BEMCheckBox** is an open source library making it easy to create beautiful, highly customizable, animated checkboxes for iOS.
**BEMCheckBox** is an open source library making it easy to create beautiful, highly customizable, animated checkboxes for iOS.

Forked from [Boris-EM/BEMCheckBox](https://github.com/Boris-Em/BEMCheckBox) because the not been updated in a while and I wanted to use an updated version in the [XPlugins.iOS.BEMCheckBox](https://github.com/saturdaymp/XPlugins.iOS.BEMCheckBox). I'm not very knowledge about Xcode and Swift so please feel free to help by creating an [issue](https://github.com/saturdaymp/BEMCheckBox/issues) and/or a [pull request](https://github.com/saturdaymp/BEMCheckBox/pulls).

## Table of Contents

Expand All @@ -27,7 +29,7 @@
* [Customization](#customization)

## Project Details
Learn more about the **BEMCheckBox** project, licensing, support etc.
A quick example of the checkbox in action.

<p align="center"><img src="./.assets/BEMCheckBox.gif"/></p>

Expand All @@ -37,11 +39,10 @@ Learn more about the **BEMCheckBox** project, licensing, support etc.
- Optimized for ARM64 Architecture.

### License
See the [License](https://github.com/Boris-Em/BEMCheckBox/blob/master/LICENSE). You are free to make changes and use this in either personal or commercial projects. Attribution is not required, but highly appreciated. A little "Thanks!" (or something to that affect) is always welcome. If you use **BEMCheckBox** in your app, please let us know!
See the [License](LICENSE). You are free to make changes and use this in either personal or commercial projects. Attribution is not required, but highly appreciated. A little "Thanks!" (or something to that affect) is always welcome for either [Saturday MP](https://github.com/saturdaymp) and/or [Boris-EM](https://github.com/Boris-Em) If you use **BEMCheckBox** in your app, please let us know!

### Support
[![Gitter chat](https://badges.gitter.im/Boris-Em/BEMCheckBox.png)](https://gitter.im/Boris-Em/BEMCheckBox)
Join us on [Gitter](https://gitter.im/Boris-Em/BEMCheckBox) if you need any help or want to talk about the project.
Open an [issue](https://github.com/saturdaymp/BEMCheckBox/issues) if you have a question, spot a bug, or have a feature request. [Pull requests](https://github.com/saturdaymp/BEMCheckBox/pulls) are welcome and much appreciated. Finally you can send an email to [support@saturdaymp.com](support@saturdaymp.com).

### Sample App
The iOS Sample App included with this project demonstrates one way to correctly setup and use **BEMCheckBox**. It also offers the possibility to customize the checkbox within the app.
Expand All @@ -61,9 +62,11 @@ It only takes a few simple steps to install and setup **BEMCheckBox** to your pr
### Installation

#### Swift Package Manager
Add `https://github.com/Boris-Em/BEMCheckBox` as a dependency to your Package.swift file or select `File -> Swift Packages -> Add Package Dependency...` in Xcode.
Add `https://github.com/saturdaymp/BEMCheckBox` as a dependency to your Package.swift file or select `File -> Swift Packages -> Add Package Dependency...` in Xcode.

#### CocoaPods
Note: The latest version on CocoaPods is [v1.4.1](https://cocoapods.org/pods/BEMCheckBox) by [Boris-Em](https://github.com/Boris-Em). If you would like me to push a new version please open an [issue](https://github.com/saturdaymp/BEMCheckBox/issues) or [pull request](https://github.com/saturdaymp/BEMCheckBox/pulls).

The easiest way to install **BEMCheckBox** is to use <a href="http://cocoapods.org/" target="_blank">CocoaPods</a>. To do so, simply add the following line to your `Podfile`:
<pre><code>pod 'BEMCheckBox'</code></pre>

Expand Down Expand Up @@ -147,10 +150,10 @@ self.group.selectedCheckBox = self.checkBox1;
### Delegate
**BEMCheckBox** uses a delegate to receive check box events. The delegate object must conform to the `BEMCheckBoxDelegate` protocol, which is composed of two optional methods:

- `didTapCheckBox:`
- `didTap:`
Sent to the delegate every time the check box gets tapped, after its properties are updated (`on`), but before the animations are completed.

- `animationDidStopForCheckBox:`
- `animationDidStop:`
Sent to the delegate every time the check box finishes being animated.

### Customization
Expand Down

0 comments on commit 1ec718b

Please sign in to comment.