chore: Update pre-release workflow and build-cap script.

This commit is contained in:
Steven Sherry 2022-08-01 15:16:20 -05:00
parent b05663b1a9
commit 96a9440a86
No known key found for this signature in database
GPG key ID: 6C07B855139186A2
3 changed files with 7 additions and 6 deletions

View file

@ -13,7 +13,9 @@ jobs:
- run: sudo xcode-select --switch /Applications/Xcode_13.0.app - run: sudo xcode-select --switch /Applications/Xcode_13.0.app
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install build dependencies - name: Install build dependencies
run: gem install cocoapods xcpretty run: |
gem install cocoapods xcpretty
brew install ghr
- name: Assign version to RELEASE_VERSION environment variable - name: Assign version to RELEASE_VERSION environment variable
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV
- name: Build Capacitor and Cordova - name: Build Capacitor and Cordova
@ -21,9 +23,5 @@ jobs:
- name: Push manifest update - name: Push manifest update
uses: EndBug/add-and-commit@v9 uses: EndBug/add-and-commit@v9
- name: Create Draft Release - name: Create Draft Release
uses: ncipollo/release-action@v1 run: ghr -token ${{ secrets.GITHUB_TOKEN }} -name ${{ env.RELEASE_VERSION }} -draft -replace ${{ env.RELEASE_VERSION }} frameworks
with:
artifacts: "./capacitor-checkout/ios/Capacitor/Capacitor.xcframework.zip,./capacitor-checkout/ios/Capacitor/Cordova.xcframework.zip"
draft: true
tag: ${{ env.RELEASE_VERSION }}

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
capacitor-checkout capacitor-checkout
*.zip *.zip
.swiftpm .swiftpm
frameworks

View file

@ -99,6 +99,8 @@ cap_cordova_url="https://github.com/ionic-team/capacitor-swift-pm/releases/downl
cap_cordova_sha=$(shasum -a 256 Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n) cap_cordova_sha=$(shasum -a 256 Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
cd ../../../ cd ../../../
mkdir frameworks
mv capacitor-checkout/ios/Capacitor/{Capacitor,Cordova}.xcframework.zip frameworks
write_package_file $cap_url $cap_sha $cap_cordova_url $cap_cordova_sha write_package_file $cap_url $cap_sha $cap_cordova_url $cap_cordova_sha