diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 070cd61..c329353 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,17 @@ jobs: - name: Build fat binary run: | swift build -c release --arch x86_64 --arch arm64 + + - name: Import Signing Certificates + uses: apple-actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.APPLE_CERTS }} + p12-password: ${{ secrets.APPLE_CERTS_PASSWORD }} + + - name: Code Sign + run: | + codesign --force --options runtime --sign 'Developer ID Application: Qiang Gu (GZG2S47WHM)' .build/apple/Products/Release/FigmaTokenGenerator + - name: Store build artifact uses: actions/upload-artifact@v1 with: @@ -39,6 +50,17 @@ jobs: - name: Archive ZIP run: zip --junk-paths ${{ runner.temp }}/FigmaTokenGenerator-${{ github.event.release.tag_name }}.zip .build/apple/Products/Release/FigmaTokenGenerator LICENSE.md + + - name: Notarize ZIP + run: | + sh notarize.sh + env: + BUNDLE_ID: com.johnny.FigmaTokenGenerator + DEV_ACCOUNT: ${{ secrets.APPLE_ID_EMAIL }} + PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + DEV_TEAM: GZG2S47WHM + FILENAME: ${{ runner.temp }}/FigmaTokenGenerator-${{ github.event.release.tag_name }}.zip + - name: Attach ZIP to release uses: actions/upload-release-asset@v1 env: diff --git a/FigmaTokenGenerator.podspec b/FigmaTokenGenerator.podspec index 4cf9dc0..04143f9 100644 --- a/FigmaTokenGenerator.podspec +++ b/FigmaTokenGenerator.podspec @@ -1,13 +1,13 @@ Pod::Spec.new do |s| s.name = 'FigmaTokenGenerator' - s.version = '0.1.2' + s.version = '0.1.5' s.summary = 'Swift Command line tool to generate static strings from a Figma Design Token Json file.' s.homepage = 'https://github.com/jhonny-me/FigmaTokenGenerator' s.license = { :type => 'MIT', :file => 'LICENSE.md' } s.author = { 'Johnny Gu' => 'guqiang180@gmail.com' } - s.source = { :git => 'https://github.com/jhonny-me/FigmaTokenGenerator.git', :tag => s.version.to_s } + s.source = { :http => "https://github.com/jhonny-me/FigmaTokenGenerator/releases/download/v#{s.version}/rswift-v#{s.version}.zip" } s.ios.deployment_target = '12.0' s.swift_version = '5.5' s.source_files = 'Sources/FigmaTokenGenerator/**/*' - s.preserve_paths = "rswift" + s.preserve_paths = "FigmaTokenGenerator" end \ No newline at end of file diff --git a/notarize.sh b/notarize.sh new file mode 100644 index 0000000..be3ad64 --- /dev/null +++ b/notarize.sh @@ -0,0 +1 @@ +xcrun altool --notarize-app --primary-bundle-id "com.johnny.figmatokengenerator" --asc-provider "Team ID" -u "iphone@wiredcraft.com" -p "APP SPECIFIEC PWD" -t osx -f FigmaTokenGenerator-0.1.5.zip \ No newline at end of file