runtime_publish #11
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 SplineRuntime.xcframework | |
on: | |
repository_dispatch: | |
types: [runtime_publish] | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate token from spline-bot | |
id: generate-token | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ secrets.SPLINE_BOT_APP_ID }} | |
private_key: ${{ secrets.SPLINE_BOT_APP_KEY }} | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
- name: Download the zip | |
uses: actions/download-artifact@v4 | |
with: | |
github-token: ${{ secrets.PATSPL }} | |
name: SplineRuntime_${{ github.event.client_payload.version }} | |
repository: ${{ github.event.client_payload.source_repo }} | |
run-id: ${{ github.event.client_payload.run_id }} | |
- name: Unzip SplineRuntime.xcframework | |
run: unzip -o SplineRuntime_${{ github.event.client_payload.version }}.zip | |
- name: Delete the zip | |
run: rm SplineRuntime_${{ github.event.client_payload.version }}.zip | |
- name: Push the changes | |
run: | | |
git config user.name "spline-bot[bot]" | |
git config user.email "spline-bot[bot]@users.noreply.github.com" | |
if [[ `git status --porcelain` ]]; then | |
git add -A | |
git commit -m "Release ${{ github.event.client_payload.version }}" | |
git push | |
else | |
echo "No local changes detected." | |
fi |