2.0.6 #23
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: Publish Sparkle Appcast | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macos-14 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Configure Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.4' | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Sparkle | |
uses: jozefizso/setup-sparkle@v1 | |
with: | |
version: 2.6.2 | |
- name: Download release asset | |
id: download | |
env: | |
GH_TOKEN: "${{ secrets.RELEASE_REPO_SECRET }}" | |
run: | | |
gh release download ${{ github.event.release.tag_name }} --repo ${{ github.repository }} --pattern '*.dmg' --dir ./ --clobber | |
- name: Generate appcast | |
env: | |
PRIVATE_SPARKLE_KEY: ${{ secrets.PRIVATE_SPARKLE_KEY }} | |
run: | | |
echo "$PRIVATE_SPARKLE_KEY" | generate_appcast --ed-key-file - ./ | |
- name: Upload appcast.xml to repository | |
env: | |
GH_TOKEN: "${{ secrets.RELEASE_REPO_SECRET }}" | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git checkout main | |
git add appcast.xml | |
git add lo-rain.dmg | |
git commit -m "Update appcast.xml and lo-rain.dmg for release ${{ github.event.release.tag_name }}" | |
git push |