Skip to content

Commit

Permalink
Merge pull request #17 from iseebi/feature/appcast
Browse files Browse the repository at this point in the history
CI: Sparkle配信の準備 (appcast.xml の生成)
  • Loading branch information
iseebi authored Aug 18, 2024
2 parents b9a219a + 397097f commit 63ce165
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ jobs:
DEV_P12_PASSWORD: ${{ secrets.MAC_DEV_CERTS_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}

- name: Prepare for app notarization
- name: Prepare for app notarization and appcast
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.ASC_KEY }}' > ~/private_keys/AuthKey_${{ secrets.ASC_KEY_ID }}.p8
echo -n '${{ secrets.APPCAST_SIGN_KEY }}' > ~/private_keys/appcast_sign_key
- name: configure exportOptions.plist
run: |
Expand Down Expand Up @@ -87,11 +88,23 @@ jobs:
KEY_PATH: ~/private_keys/AuthKey_${{ secrets.ASC_KEY_ID }}.p8
KEY_ID: ${{ secrets.ASC_KEY_ID }}
ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}

- name: Create appcast
run: |
mkdir sparkle
mkdir appcast
cd sparkle
curl -Lo sparkle.tar.xz https://github.com/sparkle-project/Sparkle/releases/download/2.6.4/Sparkle-2.6.4.tar.xz
tar xzf sparkle.tar.xz
cd ..
download_url="https://github.com/iseebi/Ukam/releases/download/${{ github.ref_name }}/"
cp build/Ukam.dmg appcast/Ukam.dmg
./sparkle/bin/generate_appcast --ed-key-file ~/private_keys/appcast_sign_key --download-url-prefix "$download_url" -o build/appcast.xml appcast/
- name: Create release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
gh release create --draft --generate-notes ${{ github.ref_name }} build/Ukam.zip build/Ukam.dmg
gh release create --draft --generate-notes ${{ github.ref_name }} build/Ukam.zip build/Ukam.dmg build/appcast.xml
env:
GH_TOKEN: ${{ github.token }}

Expand All @@ -103,10 +116,11 @@ jobs:
- name: Store artifacts
if: ${{ ! failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
build/Ukam.xcarchive.zip
build/Ukam.dmg
build/Ukam.zip
build/appcast.xml
2 changes: 2 additions & 0 deletions Ukam/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
<string>NSApplication</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>SUPublicEDKey</key>
<string>i8pur3Z+VEbhk/kPr7F9hiLFkG1Qe4B+y8/HaL4vyA8=</string>
</dict>
</plist>

0 comments on commit 63ce165

Please sign in to comment.