Skip to content

Commit

Permalink
Add GitHub Actions workflow for releasing pdfium binary for apple pla…
Browse files Browse the repository at this point in the history
…tforms
  • Loading branch information
espresso3389 committed Dec 6, 2023
1 parent 5556924 commit 07c93c5
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true
end_of_file = lf
insert_final_newline = true

[*.{dart,java,kt,swift,json}]
[*.{dart,java,kt,swift,json,yml,yaml,md,gradle,properties,xml,sh}]
charset = utf-8
indent_style = space
indent_size = 2
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pdfium-apple-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and release pdfium binaries for iOS and macOS
on:
push:
tags:
- pdfium-apple-*
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build pdfium
run: ./darwin/pdfium/build
- name: Release pdfium
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.TOKEN_FOR_RELEASE }}
tag_name: ${{ github.ref_name }}
draft: false
prerelease: false
body: iOS/macOS pdfium prebuilt binary distribution for pdfrx (${{ github.ref_name }}).
files: |
./darwin/pdfium/pdfium-ios.tgz
./darwin/pdfium/pdfium-macos.tgz
4 changes: 4 additions & 0 deletions darwin/pdfium/build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if [[ ! -d ios/pdfium.xcframework ]]; then

mkdir -p ios/
xcodebuild -create-xcframework -library .tmp/out/lib/ios-arm64-release/libpdfium.a -headers .tmp/out/include -library .tmp/out/lib/iossim-release/libpdfium.a -headers .tmp/out/include -output ios/pdfium.xcframework

tar -czvf pdfium-ios.tgz ios
fi

# for macOS
Expand All @@ -27,4 +29,6 @@ if [[ ! -d macos/pdfium.xcframework ]]; then
mkdir -p macos/
rm -rf macos/pdfium.xcframework
xcodebuild -create-xcframework -library .tmp/out/lib/macos-release/libpdfium.a -headers .tmp/out/include -output macos/pdfium.xcframework

tar -czvf pdfium-macos.tgz macos
fi
54 changes: 39 additions & 15 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ packages:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
url: "https://pub.dev"
source: hosted
version: "6.1.4"
version: "7.0.0"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -106,6 +106,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
intl:
dependency: transitive
description:
name: intl
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.dev"
source: hosted
version: "0.18.1"
js:
dependency: transitive
description:
Expand All @@ -114,6 +122,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "2c30f27ada446b4d36307aade893faaaeb6d8f55b2362b7f424a9668fcc43f4d"
url: "https://pub.dev"
source: hosted
version: "9.0.14"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: b06739349ec2477e943055aea30172c5c7000225f79dad4702e2ec0eda79a6ff
url: "https://pub.dev"
source: hosted
version: "1.0.5"
lints:
dependency: transitive
description:
Expand All @@ -134,18 +158,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
path:
dependency: transitive
description:
Expand All @@ -160,23 +184,23 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.0"
version: "0.1.1"
platform:
dependency: transitive
description:
name: platform
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
version: "3.1.3"
process:
dependency: transitive
description:
name: process
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
sha256: "266ca5be5820feefc777793d0a583acfc8c40834893c87c00c6c09e2cf58ea42"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
version: "5.0.1"
rxdart:
dependency: transitive
description:
Expand Down Expand Up @@ -266,10 +290,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "11.10.0"
version: "13.0.0"
web:
dependency: transitive
description:
Expand All @@ -282,10 +306,10 @@ packages:
dependency: transitive
description:
name: webdriver
sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49"
sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.3"
sdks:
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.7.0"

0 comments on commit 07c93c5

Please sign in to comment.