Skip to content

Merge branch 'develop' #8

Merge branch 'develop'

Merge branch 'develop' #8

Workflow file for this run

name: Archive
on:
push:
tags: [ 0.* ]
workflow_dispatch:
inputs:
logLevel:
jobs:
release-osx:
runs-on: macos-13
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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@v2
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: SPM
run: xcodebuild -resolvePackageDependencies
- name: Archive
run: xcodebuild archive -project NeteaseMusic.xcodeproj -scheme NeteaseMusic -archivePath archive/NeteaseMusic.xcarchive -showBuildTimingSummary -allowProvisioningUpdates
- name: CodeSign And Package
shell: zsh {0}
run: |
cd archive/NeteaseMusic.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@v3
if: "!startsWith(github.ref, 'refs/tags/')"
with:
name: archive
path: |
archive/NeteaseMusic.xcarchive/Products/Applications/*.zip
archive/NeteaseMusic.xcarchive/Products/Applications/*.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
archive/NeteaseMusic.xcarchive/Products/Applications/*.zip
archive/NeteaseMusic.xcarchive/Products/Applications/*.dmg
- name: Sparkle
shell: zsh {0}
if: startsWith(github.ref, 'refs/tags/')
run: |
cp archive/NeteaseMusic.xcarchive/Products/Applications/Netease\ Music*.zip AppUpdaterAppcasts/NeteaseMusic/
Sparkle/bin/generate_appcast AppUpdaterAppcasts/NeteaseMusic/ -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/NeteaseMusic.xcarchive/Products/Applications/*.zip zip)"
git push https://${{ secrets.PAT }}@github.com/xjbeta/AppUpdaterAppcasts.git