Merge branch 'develop' #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Archive | |
on: | |
push: | |
tags: [ 0.* ] | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
jobs: | |
release-osx: | |
runs-on: macos-14 | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v4 | |
- name: Clone AppUpdaterAppcasts | |
run: git clone https://github.com/xjbeta/AppUpdaterAppcasts | |
- name: Download Sparkle | |
shell: zsh {0} | |
run: | | |
brew info --json=v2 sparkle | grep -wo "https.*.tar.xz" | wget -qi - | |
mkdir Sparkle | |
tar -xf Sparkle*.tar.xz -C Sparkle | |
- uses: apple-actions/import-codesign-certs@v3 | |
with: | |
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
p12-password: ${{ secrets.P12_PASSWORD }} | |
- name: Show Build Version | |
run: xcodebuild -version | |
- name: Show Build Settings | |
run: xcodebuild -showBuildSettings | |
- name: Show Build SDK | |
run: xcodebuild -showsdks | |
- name: Prepare create-dmg | |
run: | | |
brew install node | |
npm install -g node-gyp | |
npm install -g create-dmg | |
- name: Prepare WebFiles Dependencies | |
run: | | |
cd IINA+/WebFiles/ | |
npm install | |
- name: Download Plugin | |
uses: robinraju/[email protected] | |
with: | |
repository: 'xjbeta/iina-plugin-danmaku' | |
tag: "0.1.9" | |
fileName: "iina-plugin-danmaku.iinaplgz" | |
out-file-path: "IINA+" | |
- name: SPM | |
run: xcodebuild -resolvePackageDependencies | |
- name: Archive | |
run: xcodebuild archive -project IINA+.xcodeproj -scheme IINA+ -destination 'generic/platform=macOS' -archivePath archive/IINA+.xcarchive -showBuildTimingSummary -allowProvisioningUpdates | |
- name: CodeSign And Package | |
shell: zsh {0} | |
run: | | |
cd archive/IINA+.xcarchive/Products/Applications/ | |
codesign --deep --force --timestamp --sign ${{ secrets.SIGN_NAME }} *.app | |
create-dmg *.app | |
codesign --deep --force --timestamp --sign ${{ secrets.SIGN_NAME }} *.dmg | |
ditto -c -k --sequesterRsrc --keepParent *.app "$(basename *.dmg .dmg)".zip | |
ditto -c -k --sequesterRsrc --keepParent ../../dSYMs dSYMs.zip | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
with: | |
name: archive | |
path: | | |
archive/IINA+.xcarchive/Products/Applications/*.zip | |
archive/IINA+.xcarchive/Products/Applications/*.dmg | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
archive/IINA+.xcarchive/Products/Applications/*.zip | |
archive/IINA+.xcarchive/Products/Applications/*.dmg | |
- name: Sparkle | |
shell: zsh {0} | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cp archive/IINA+.xcarchive/Products/Applications/IINA*.zip AppUpdaterAppcasts/IINA-Plus/ | |
Sparkle/bin/generate_appcast AppUpdaterAppcasts/IINA-Plus/ -s ${{ secrets.SUPRIVATEEDKEY }} | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
cd AppUpdaterAppcasts | |
# git checkout -b ci-test | |
git add -A | |
git commit -m "$(basename ../archive/IINA+.xcarchive/Products/Applications/*.dmg dmg)" | |
git push https://${{ secrets.PAT }}@github.com/xjbeta/AppUpdaterAppcasts.git |